From 79b0da6e7c7f2dba1b07d80e8fb45de2c376ca53 Mon Sep 17 00:00:00 2001
From: Bruce Momjian Last updated: Fri Feb 14 09:03:00 EST 2003 Last updated: Wed Jul 23 00:11:07 EDT 2003 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) The most recent version of this document can be viewed at http://www.ca.PostgreSQL.org/docs/faq-english.html.Frequently Asked Questions (FAQ) for PostgreSQL
-
@@ -18,10 +18,10 @@
Platform-specific questions are answered at http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html.
+ "http://www.PostgreSQL.org/docs/index.html">http://www.PostgreSQL.org/docs/index.html.The database server can run on Windows NT and Win2k using Cygwin, the Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in the distribution or the MS Windows FAQ - at - http://www.PostgreSQL.org/docs/faq-mswin.html.
+ at + http://www.PostgreSQL.org/docs/faqs/text/FAQ_MSWIN.A native port to MS Win NT/2000/XP is currently being worked - on.
+ on. For more details on the current status of PostgreSQL on Windows see + + http://techdocs.postgresql.org/guides/Windows. + +There is also a Novell Netware 6 port at + http://forge.novell.com.
There is also an IRC channel on EFNet, channel
- #PostgreSQL. I use the Unix command There is also an IRC channel on EFNet and OpenProjects,
+ channel #PostgreSQL. I use the Unix command A list of commercial support companies is available at http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html.irc -c
+
irc -c
'#PostgreSQL' "$USER" irc.phoenix.net.
Several manuals, manual pages, and some small test examples are included in the distribution. See the /doc directory. You - can also browse the manual online at http://www.ca.PostgreSQL.org/users-lounge/docs/.
+ can also browse the manuals online at http://www.PostgreSQL.org/docs.There are two PostgreSQL books available online at http://www.PostgreSQL.org/docs/awbook.html @@ -335,7 +340,7 @@ "http://www.commandprompt.com/ppbook/">http://www.commandprompt.com/ppbook/. There is a list of PostgreSQL books available for purchase at http://www.ca.PostgreSQL.org/books/. + "http://techdocs.postgresql.org/techdocs/bookreviews.php">http://techdocs.PostgreSQL.org/techdocs/bookreviews.php. There is also a collection of PostgreSQL technical articles at http://techdocs.PostgreSQL.org/.
@@ -498,6 +503,11 @@ send a check to the contact address.Also, if you have a success story about PostgreSQL, please submit + it to our advocacy site at + http://advocacy.postgresql.org.
+ +Yes, there are several graphical interfaces to PostgreSQL available. These include PgAccess http://www.pgaccess.org), PgAdmin II (http://www.pgadmin.org, @@ -545,7 +555,9 @@ http://www.thekompany.com/products/rekall/, proprietary). There is also PHPPgAdmin ( http://phppgadmin.sourceforge.net/ ), a web-based interface to - PostgreSQL. + PostgreSQL.
+ +See http://techdocs.postgresql.org/guides/GUITools for a more detailed list.
See the FETCH manual page, or use SELECT ... LIMIT....
@@ -804,6 +816,14 @@ records requested, or the entire query may have to be evaluated until the desired rows have been generated. +To SELECT a random row, use: +
+ SELECT col + FROM tab + ORDER BY random() + LIMIT 1; ++
This functionality was added in release 7.3 with +
DROP COLUMN functionality was added in release 7.3 with ALTER TABLE DROP COLUMN. In earlier versions, you can do this:
@@ -831,12 +851,23 @@ COMMIT;+
To change the data type of a column, do this:
++ BEGIN; + ALTER TABLE tab ADD COLUMN new_col new_data_type; + UPDATE tab SET new_col = CAST(old_col AS new_data_type); + ALTER TABLE tab DROP COLUMN old_col; + COMMIT; ++
You might then want to do VACUUM FULL tab to reclaim the + disk space used by the expired rows.
+These are the limits:
- Maximum size for a database? unlimited (1 TB databases exist) + Maximum size for a database? unlimited (4 TB databases exist) Maximum size for a table? 16 TB Maximum size for a row? 1.6TB Maximum size for a field? 1 GB @@ -1037,14 +1068,14 @@ Type Internal Name Notes VARCHAR(n) varchar size specifies maximum length, no padding CHAR(n) bpchar blank padded to the specified fixed length TEXT text no specific upper limit on length -"char" char one character BYTEA bytea variable-length byte array (null-byte safe) +"char" char one character
You will see the internal name when examining system catalogs and in some error messages.
-The last four types above are "varlena" types (i.e., the first +
The first four types above are "varlena" types (i.e., the first four bytes on disk are the length, followed by the data). Thus the actual space used is slightly greater than the declared size. However, these data types are also subject to compression or being @@ -1058,8 +1089,8 @@ BYTEA bytea variable-length byte array (null-byte safe) same length. CHAR(n) pads with blanks to the specified length, while VARCHAR(n) only stores the characters supplied. BYTEA is for storing binary data, - particularly values that include NULL bytes. These - types have similar performance characteristics.
+ particularly values that include NULL bytes. All the + types described here have similar performance characteristics.You can return result sets from PL/pgSQL functions using - refcursors. See - http://www.PostgreSQL.org/idocs/index.php?plpgsql-cursors.html, - section 23.7.3.3.
+In 7.3, you can easily return multiple rows or columns from a + function, + + http://techdocs.postgresql.org/guides/SetReturningFunctions.