Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1aab783b
Commit
1aab783b
authored
Sep 23, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement TODO item:
* Change LIMIT val,val to offset,limit to match MySQL Documentation updates too.
parent
ddfdb1e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
17 deletions
+22
-17
doc/TODO
doc/TODO
+4
-4
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select.sgml
+12
-8
doc/src/sgml/sql.sgml
doc/src/sgml/sql.sgml
+3
-2
src/backend/parser/gram.y
src/backend/parser/gram.y
+3
-3
No files found.
doc/TODO
View file @
1aab783b
...
...
@@ -74,10 +74,10 @@ TYPES
o Allow nulls in arrays
o Allow arrays to be ORDER'ed
o fix array handling in ECPG
BINARY DATA
lf
BINARY DATA
o -Add non-large-object binary field (already exists -- bytea)
o -Make binary interface for TOAST columns (base64)
o Improve vacuum of large objects
(/contrib/vacuumlo)
o Improve vacuum of large objects
, like /contrib/vacuumlo
o Add security checking for large objects
o Make file in/out interface for TOAST columns, similar to large object
interface (force out-of-line storage and no compression)
...
...
@@ -105,7 +105,7 @@ INDEXES
* Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
fails index can't store constant parameters
* Add FILLFACTOR to index creation
* Order duplicate index entries by tid
* Order duplicate index entries by tid
for faster heap lookups
* -Re-enable partial indexes
* -Prevent pg_attribute from having duplicate oids for indexes (Tom)
* Allow inherited tables to inherit index, UNIQUE constraint, and primary
...
...
@@ -124,7 +124,7 @@ INDEXES
non-consecutive keys or OR clauses, so fewer heap accesses
* Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
float4, numeric/decimal too [optimizer]
* Use indexes with CIDR '<<' (contains) operator
*
-
Use indexes with CIDR '<<' (contains) operator
* Allow LIKE indexing optimization for non-ASCII locales
* Be smarter about insertion of already-ordered data into btree index
* -Gather more accurate dispersion statistics using indexes (Tom)
...
...
doc/src/sgml/ref/select.sgml
View file @
1aab783b
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.4
6 2001/09/14 10:28:09 ishii
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.4
7 2001/09/23 03:39:01 momjian
Exp $
Postgres documentation
-->
...
...
@@ -29,7 +29,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
[ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
[ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
where <replaceable class="PARAMETER">from_item</replaceable> can be:
...
...
@@ -613,7 +614,8 @@ SELECT name FROM distributors ORDER BY code;
<synopsis>
<replaceable class="PARAMETER">table_query</replaceable> UNION [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
</synopsis>
where
...
...
@@ -662,7 +664,8 @@ SELECT name FROM distributors ORDER BY code;
<synopsis>
<replaceable class="PARAMETER">table_query</replaceable> INTERSECT [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
</synopsis>
where
...
...
@@ -702,7 +705,8 @@ SELECT name FROM distributors ORDER BY code;
<synopsis>
<replaceable class="PARAMETER">table_query</replaceable> EXCEPT [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
</synopsis>
where
...
...
@@ -738,7 +742,7 @@ SELECT name FROM distributors ORDER BY code;
</title>
<para>
<synopsis>
LIMIT
{ <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]
LIMIT
[ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL }
OFFSET <replaceable class="PARAMETER">start</replaceable>
</synopsis>
...
...
@@ -761,14 +765,14 @@ SELECT name FROM distributors ORDER BY code;
constrains the result rows into a unique order. Otherwise you will get
an unpredictable subset of the query's rows---you may be asking for
the tenth through twentieth rows, but tenth through twentieth in what
ordering? You don't know what ordering
, unless you specified
ORDER BY.
ordering? You don't know what ordering
unless you specify
ORDER BY.
</para>
<para>
As of <productname>Postgres</productname> 7.0, the
query optimizer takes LIMIT into account when generating a query plan,
so you are very likely to get different plans (yielding different row
orders) depending on what you
giv
e for LIMIT and OFFSET. Thus, using
orders) depending on what you
us
e for LIMIT and OFFSET. Thus, using
different LIMIT/OFFSET values to select different subsets of a query
result <emphasis>will give inconsistent results</emphasis> unless
you enforce a predictable result ordering with ORDER BY. This is not
...
...
doc/src/sgml/sql.sgml
View file @
1aab783b
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.2
1 2001/05/22 16:00:00 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.2
2 2001/09/23 03:39:01 momjian
Exp $
-->
<chapter id="sql">
...
...
@@ -864,7 +864,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
[ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
[ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable class="PARAMETER">operator</replaceable> ] [, ...] ]
[ FOR UPDATE [ OF <replaceable class="PARAMETER">class_name</replaceable> [, ...] ] ]
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } [ { OFFSET | , } <replaceable class="PARAMETER">start</replaceable> ]]
[ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
</synopsis>
</para>
...
...
src/backend/parser/gram.y
View file @
1aab783b
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.25
2 2001/09/20 14:20:27 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.25
3 2001/09/23 03:39:01 momjian
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -3587,8 +3587,8 @@ OptUseOp: USING all_Op { $$ = $2; }
;
select_limit: LIMIT select_
limit_value ',' select_offse
t_value
{ $$ = makeList2($
4, $2
); }
select_limit: LIMIT select_
offset_value ',' select_limi
t_value
{ $$ = makeList2($
2, $4
); }
| LIMIT select_limit_value OFFSET select_offset_value
{ $$ = makeList2($4, $2); }
| LIMIT select_limit_value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment