Обсуждение: Re: Bug in PL/PgSQL "SELECT .. INTO" statement parser

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

Re: Bug in PL/PgSQL "SELECT .. INTO" statement parser

От
Oleg Serov
Дата:
Sorry, but is not important, i forgot to remove original table name
"chunk_ad", but is not affected  to the bug..

2009/1/21 Oleg Serov <serovov@gmail.com>:
> Here is an example:
>
> CREATE TABLE test2 (
>        id BIGINT,
>        chunk_id BIGINT
> );
> CREATE TABLE test1 (
>        id BIGINT
> );
>
> CREATE OR REPLACE FUNCTION "bug" () RETURNS pg_catalog.void AS
> $body$
> DECLARE
>    row_test1 test1%rowtype;
>    row_test2 test2%rowtype;
> BEGIN
>    SELECT test1, chunk_ad
>        FROM test1 JOIN test2 ON(chunk.id =3D test2.chunk_id)
>        LIMIT 1
>        INTO row_test1, row_test2;
>
> END;
> $body$
> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER;
>
> Will throw error:
> ERROR:  LIMIT #,# syntax is not supported
> HINT:  Use separate LIMIT and OFFSET clauses.
> QUERY:  SELECT test1, chunk_ad FROM test1 JOIN test2 ON(chunk.id =3D
> test2.chunk_id) LIMIT 1, 0,  $1
> CONTEXT:  SQL statement in PL/PgSQL function "bug" near line 8
>
> ********** =EF=DB=C9=C2=CB=C1 **********
>
> ERROR: LIMIT #,# syntax is not supported
> SQL state: 42601
> =F0=CF=C4=D3=CB=C1=DA=CB=C1:Use separate LIMIT and OFFSET clauses.
> =EB=CF=CE=D4=C5=CB=D3=D4:SQL statement in PL/PgSQL function "bug" near li=
ne 8
>

Re: Bug in PL/PgSQL "SELECT .. INTO" statement parser

От
Oleg Serov
Дата:
Up. Anybody will answer on this bug report?

2009/1/21 Oleg Serov <serovov@gmail.com>

> Sorry, but is not important, i forgot to remove original table name
> "chunk_ad", but is not affected  to the bug..
>
> 2009/1/21 Oleg Serov <serovov@gmail.com>:
> > Here is an example:
> >
> > CREATE TABLE test2 (
> >        id BIGINT,
> >        chunk_id BIGINT
> > );
> > CREATE TABLE test1 (
> >        id BIGINT
> > );
> >
> > CREATE OR REPLACE FUNCTION "bug" () RETURNS pg_catalog.void AS
> > $body$
> > DECLARE
> >    row_test1 test1%rowtype;
> >    row_test2 test2%rowtype;
> > BEGIN
> >    SELECT test1, chunk_ad
> >        FROM test1 JOIN test2 ON(chunk.id =3D test2.chunk_id)
> >        LIMIT 1
> >        INTO row_test1, row_test2;
> >
> > END;
> > $body$
> > LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER;
> >
> > Will throw error:
> > ERROR:  LIMIT #,# syntax is not supported
> > HINT:  Use separate LIMIT and OFFSET clauses.
> > QUERY:  SELECT test1, chunk_ad FROM test1 JOIN test2 ON(chunk.id =3D
> > test2.chunk_id) LIMIT 1, 0,  $1
> > CONTEXT:  SQL statement in PL/PgSQL function "bug" near line 8
> >
> > ********** =EF=DB=C9=C2=CB=C1 **********
> >
> > ERROR: LIMIT #,# syntax is not supported
> > SQL state: 42601
> > =F0=CF=C4=D3=CB=C1=DA=CB=C1:Use separate LIMIT and OFFSET clauses.
> > =EB=CF=CE=D4=C5=CB=D3=D4:SQL statement in PL/PgSQL function "bug" near =
line 8
> >
>



--=20
=F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD

=EF=CC=C5=C7 =F3=C5=D2=CF=D7

Re: Bug in PL/PgSQL "SELECT .. INTO" statement parser

От
Oleg Serov
Дата:
Submitted as #*5352 bug.*

2010/2/26 Oleg Serov <serovov@gmail.com>

> Up. Anybody will answer on this bug report?
>
>
> 2009/1/21 Oleg Serov <serovov@gmail.com>
>
>> Sorry, but is not important, i forgot to remove original table name
>> "chunk_ad", but is not affected  to the bug..
>>
>> 2009/1/21 Oleg Serov <serovov@gmail.com>:
>> > Here is an example:
>> >
>> > CREATE TABLE test2 (
>> >        id BIGINT,
>> >        chunk_id BIGINT
>> > );
>> > CREATE TABLE test1 (
>> >        id BIGINT
>> > );
>> >
>> > CREATE OR REPLACE FUNCTION "bug" () RETURNS pg_catalog.void AS
>> > $body$
>> > DECLARE
>> >    row_test1 test1%rowtype;
>> >    row_test2 test2%rowtype;
>> > BEGIN
>> >    SELECT test1, chunk_ad
>> >        FROM test1 JOIN test2 ON(chunk.id =3D test2.chunk_id)
>> >        LIMIT 1
>> >        INTO row_test1, row_test2;
>> >
>> > END;
>> > $body$
>> > LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER;
>> >
>> > Will throw error:
>> > ERROR:  LIMIT #,# syntax is not supported
>> > HINT:  Use separate LIMIT and OFFSET clauses.
>> > QUERY:  SELECT test1, chunk_ad FROM test1 JOIN test2 ON(chunk.id =3D
>> > test2.chunk_id) LIMIT 1, 0,  $1
>> > CONTEXT:  SQL statement in PL/PgSQL function "bug" near line 8
>> >
>> > ********** =EF=DB=C9=C2=CB=C1 **********
>> >
>> > ERROR: LIMIT #,# syntax is not supported
>> > SQL state: 42601
>> > =F0=CF=C4=D3=CB=C1=DA=CB=C1:Use separate LIMIT and OFFSET clauses.
>> > =EB=CF=CE=D4=C5=CB=D3=D4:SQL statement in PL/PgSQL function "bug" near=
 line 8
>> >
>>
>
>
>
> --
> =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD
>
> =EF=CC=C5=C7 =F3=C5=D2=CF=D7
>



--=20
=F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD

=EF=CC=C5=C7 =F3=C5=D2=CF=D7