1010alink ="#0000ff ">
1111< H1 > Frequently Asked Questions (FAQ) for PostgreSQL</ H1 >
1212
13- < P > Last updated: Mon Jan 3119:18:44 EST 2005</ P >
13+ < P > Last updated: Mon Jan 3120:35:58 EST 2005</ P >
1414
1515< P > Current maintainer: Bruce Momjian (< A href =
1616 "mailto:pgman@candle.pha.pa.us "> pgman@candle.pha.pa.us</ A > )
@@ -590,18 +590,13 @@ <H4><A name="3.7">3.7</A>) Why do I need to do a dump and restore
590590 to upgrade between major PostgreSQL releases?</ H4 >
591591
592592< P > The PostgreSQL team makes only small changes between minor releases,
593- so upgrading from 7.2 to 7.2 .1 does not require a dump and restore.
594- However, major releases (e.g. from 7.2 to 7.3 ) often change the internal
593+ so upgrading from 7.4 to 7.4 .1 does not require a dump and restore.
594+ However, major releases (e.g. from 7.3 to 7.4 ) often change the internal
595595 format of system tables and data files. These changes are often complex,
596- so we don't maintain backwardcompatability for data files. A dump outputs
596+ so we don't maintain backwardcompatibility for data files. A dump outputs
597597 data in a generic format that can then be loaded in using the new internal
598598 format.</ P >
599599
600- < P > In releases where the on-disk format does not change, the
601- < I > pg_upgrade</ I > script can be used to upgrade without a dump/restore.
602- The release notes mention whether< I > pg_upgrade</ I > is available for the
603- release.</ P >
604-
605600< H4 > < A name ="3.8 "> 3.8</ A > ) What computer hardware should I use?</ H4 >
606601
607602< P > Because PC hardware is mostly compatible, people tend to believe that
@@ -619,15 +614,13 @@ <H2 align="center">Operational Questions</H2>
619614< H4 > < A name ="4.1 "> 4.1</ A > ) How do I< SMALL > SELECT</ SMALL > only the
620615 first few rows of a query? A random row?</ H4 >
621616
622- < P > See the< SMALL > FETCH</ SMALL > manual page, or use
623- < SMALL > SELECT</ SMALL > ...< SMALL > LIMIT</ SMALL > ....</ P >
624-
625- < P > The entire query may have to be evaluated, even if you only want
626- the first few rows. Consider using a query that has an< SMALL > ORDER
627- BY</ SMALL > . If there is an index that matches the< SMALL > ORDER
628- BY</ SMALL > , PostgreSQL may be able to evaluate only the first few
629- records requested, or the entire query may have to be evaluated
630- until the desired rows have been generated.</ P >
617+ < P > To retrieve only a few rows, if you know at the number of rows
618+ needed at the time of the< SMALL > SELECT</ SMALL > use
619+ < SMALL > LIMIT</ SMALL > . If an index matches the< SMALL > ORDER
620+ BY</ SMALL > it is possible the entire query does not have to be
621+ executed. If you don't know the number of rows at
622+ < SMALL > SELECT</ SMALL > time, use a cursor and
623+ < SMALL > FETCH</ SMALL > .</ P >
631624
632625< P > To< SMALL > SELECT</ SMALL > a random row, use:
633626< PRE >