Re: Inserting a select statement result into another table
| От | Denis Perchine |
|---|---|
| Тема | Re: Inserting a select statement result into another table |
| Дата | |
| Msg-id | 0010131102290Q.01672@dyp.perchine.com обсуждение исходный текст |
| Ответ на | Re: Inserting a select statement result into another table (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-hackers |
Hello, just my $0.02... If I do insert into x select * from y limit 10; I will get all of rows in x inserted, not just 10... I already wrote about this... But did not get any useful reply. > This is an interesting idea. We don't allow ORDER BY in INSERT INTO ... > SELECT because it doesn't make any sense, but it does make sense if > LIMIT is used: > > ctest=> create table x (Y oid); > CREATE > test=> insert into x > test-> select oid from pg_class order by oid limit 1; > ERROR: LIMIT is not supported in subselects > > Added to TODO: > > Allow ORDER BY...LIMIT in INSERT INTO ... SELECT -- Sincerely Yours, Denis Perchine ---------------------------------- E-Mail: dyp@perchine.com HomePage: http://www.perchine.com/dyp/ FidoNet: 2:5000/120.5 ----------------------------------
В списке pgsql-hackers по дате отправления: