Обсуждение: Bug #732: LIMIT clause bugs with insert...select

Поиск
Список
Период
Сортировка

Bug #732: LIMIT clause bugs with insert...select

От
pgsql-bugs@postgresql.org
Дата:
Guillaume Lafarge (guillaume.lafarge@exalog.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
LIMIT clause bugs with insert...select

Long Description
The LIMIT clause is not working with SELECT command if SELECT is part of INSERT command.

Sample Code
insert into table1 select * from table2 limit 20;

No file was uploaded with this report

Re: Bug #732: LIMIT clause bugs with insert...select

От
Tom Lane
Дата:
pgsql-bugs@postgresql.org writes:
> The LIMIT clause is not working with SELECT command if SELECT is part of INSERT command.

Works fine for me in 7.2.1 and current development sources.  What
PG version are you using?

            regards, tom lane

Re: Bug #732: LIMIT clause bugs with insert...select

От
Bruce Momjian
Дата:
Strange, it works here.  What version are you using:

    test=> create table xx as select * from pg_class where 1=0;
    SELECT
    test=> insert into xx select * from pg_class limit 1;
    INSERT 16869 1
    test=> select * from pg_class;
    (1 row)

---------------------------------------------------------------------------

pgsql-bugs@postgresql.org wrote:
> Guillaume Lafarge (guillaume.lafarge@exalog.com) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> LIMIT clause bugs with insert...select
>
> Long Description
> The LIMIT clause is not working with SELECT command if SELECT is part of INSERT command.
>
> Sample Code
> insert into table1 select * from table2 limit 20;
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  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