Re: INSERT/SELECT with ORDER BY

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Bob Rivoir <rhr2@psu.edu>, pgsql-bugs@postgresql.org
Date: 2000-10-12T19:00:36Z
Lists: pgsql-bugs
> 
> Unless I'm horribly misreading the spec, this is correct.  
> ORDER BY is used in reference to cursor definitions and
> direct select statements, but is not part of query expressions
> which is what the INSERT INTO references.
> 
>          <insert statement> ::=
>               INSERT INTO <table name>
>                 <insert columns and source>
> 
>          <insert columns and source> ::=
>                 [ <left paren> <insert column list> <right paren> ]
>               <query expression>
>               | DEFAULT VALUES
> 
>          <insert column list> ::= <column name list>
> 
> But, this may be a useful extension to allow, at least with the
> existance of LIMIT.

Yes, added to TODO.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026