Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1aab783

Browse files
committed
Implement TODO item:
* Change LIMIT val,val to offset,limit to match MySQLDocumentation updates too.
1 parentddfdb1e commit1aab783

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

‎doc/TODO

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ TYPES
7474
o Allow nulls in arrays
7575
o Allow arrays to be ORDER'ed
7676
o fix array handling in ECPG
77-
BINARY DATA
77+
lfBINARY DATA
7878
o -Add non-large-object binary field (already exists -- bytea)
7979
o -Make binary interface for TOAST columns (base64)
80-
o Improve vacuum of large objects (/contrib/vacuumlo)
80+
o Improve vacuum of large objects, like/contrib/vacuumlo
8181
o Add security checking for large objects
8282
o Make file in/out interface for TOAST columns, similar to large object
8383
interface (force out-of-line storage and no compression)
@@ -105,7 +105,7 @@ INDEXES
105105
* Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
106106
fails index can't store constant parameters
107107
* Add FILLFACTOR to index creation
108-
* Order duplicate index entries by tid
108+
* Order duplicate index entries by tid for faster heap lookups
109109
* -Re-enable partial indexes
110110
* -Prevent pg_attribute from having duplicate oids for indexes (Tom)
111111
* Allow inherited tables to inherit index, UNIQUE constraint, and primary
@@ -124,7 +124,7 @@ INDEXES
124124
non-consecutive keys or OR clauses, so fewer heap accesses
125125
* Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
126126
float4, numeric/decimal too [optimizer]
127-
* Use indexes with CIDR '<<' (contains) operator
127+
*-Use indexes with CIDR '<<' (contains) operator
128128
* Allow LIKE indexing optimization for non-ASCII locales
129129
* Be smarter about insertion of already-ordered data into btree index
130130
* -Gather more accurate dispersion statistics using indexes (Tom)

‎doc/src/sgml/ref/select.sgml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.46 2001/09/14 10:28:09 ishii Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.47 2001/09/23 03:39:01 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -29,7 +29,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
2929
[ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
3030
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
3131
[ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
32-
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
32+
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
33+
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
3334

3435
where <replaceable class="PARAMETER">from_item</replaceable> can be:
3536

@@ -613,7 +614,8 @@ SELECT name FROM distributors ORDER BY code;
613614
<synopsis>
614615
<replaceable class="PARAMETER">table_query</replaceable> UNION [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
615616
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
616-
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
617+
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
618+
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
617619
</synopsis>
618620

619621
where
@@ -662,7 +664,8 @@ SELECT name FROM distributors ORDER BY code;
662664
<synopsis>
663665
<replaceable class="PARAMETER">table_query</replaceable> INTERSECT [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
664666
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
665-
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
667+
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
668+
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
666669
</synopsis>
667670

668671
where
@@ -702,7 +705,8 @@ SELECT name FROM distributors ORDER BY code;
702705
<synopsis>
703706
<replaceable class="PARAMETER">table_query</replaceable> EXCEPT [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
704707
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
705-
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
708+
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
709+
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
706710
</synopsis>
707711

708712
where
@@ -738,7 +742,7 @@ SELECT name FROM distributors ORDER BY code;
738742
</title>
739743
<para>
740744
<synopsis>
741-
LIMIT{ <replaceable class="PARAMETER">count</replaceable>| ALL } [ { OFFSET | , }<replaceable class="PARAMETER">start</replaceable>]
745+
LIMIT[ <replaceable class="PARAMETER">start</replaceable>, ] {<replaceable class="PARAMETER">count</replaceable>| ALL }
742746
OFFSET <replaceable class="PARAMETER">start</replaceable>
743747
</synopsis>
744748

@@ -761,14 +765,14 @@ SELECT name FROM distributors ORDER BY code;
761765
constrains the result rows into a unique order. Otherwise you will get
762766
an unpredictable subset of the query's rows---you may be asking for
763767
the tenth through twentieth rows, but tenth through twentieth in what
764-
ordering? You don't know what ordering, unless youspecified ORDER BY.
768+
ordering? You don't know what ordering unless youspecify ORDER BY.
765769
</para>
766770

767771
<para>
768772
As of <productname>Postgres</productname> 7.0, the
769773
query optimizer takes LIMIT into account when generating a query plan,
770774
so you are very likely to get different plans (yielding different row
771-
orders) depending on what yougive for LIMIT and OFFSET. Thus, using
775+
orders) depending on what youuse for LIMIT and OFFSET. Thus, using
772776
different LIMIT/OFFSET values to select different subsets of a query
773777
result <emphasis>will give inconsistent results</emphasis> unless
774778
you enforce a predictable result ordering with ORDER BY. This is not

‎doc/src/sgml/sql.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.21 2001/05/22 16:00:00 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.22 2001/09/23 03:39:01 momjian Exp $
33
-->
44

55
<chapter id="sql">
@@ -864,7 +864,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
864864
[ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
865865
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
866866
[ FOR UPDATE [ OF <replaceable class="PARAMETER">class_name</replaceable> [, ...] ] ]
867-
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
867+
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
868+
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
868869
</synopsis>
869870
</para>
870871

‎src/backend/parser/gram.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.252 2001/09/20 14:20:27 petere Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.253 2001/09/23 03:39:01 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -3587,8 +3587,8 @@ OptUseOp: USING all_Op{ $$ = $2; }
35873587
;
35883588

35893589

3590-
select_limit:LIMITselect_limit_value','select_offset_value
3591-
{$$ = makeList2($4,$2); }
3590+
select_limit:LIMITselect_offset_value','select_limit_value
3591+
{$$ = makeList2($2,$4); }
35923592
|LIMITselect_limit_valueOFFSETselect_offset_value
35933593
{$$ = makeList2($4,$2); }
35943594
|LIMITselect_limit_value

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp