Hi

Just noticed that limit is ignored when using a select to insert
into a table.

Eg. insert into mytable (f1, f2) select f1, f2 from myothertable limit 10;

selects all records from myothertable.

Using the select with limit on it's own works fine.

Version 6.5.2 on RH6

--------
Regards
Theo

Fri, 10 Dec 1999 12:57:17 +0200
Theo Kramer <theo@flame.co.za>
insert using select with limit
Theo Kramer <theo@flame.co.za> writes:
> Just noticed that limit is ignored when using a select to insert
> into a table.
> Eg. insert into mytable (f1, f2) select f1, f2 from myothertable limit 10;
> selects all records from myothertable.

Ugh, you're right.  Not sure if this will be easily fixable or not.
Worst case, the fix might have to wait for the long-planned query tree
redesign.

Or it might be a one-liner.  Will look into it.

			regards, tom lane

Fri, 10 Dec 1999 10:41:12 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] insert using select with limit 