Re: [BUGS] Bug with FOR ... LOOP and composite types

2008-09-03 Thread Oleg Serov
Yes, you are right, with record type working correct; Thanks 2008/9/2 Tom Lane <[EMAIL PROTECTED]> > "Oleg Serov" <[EMAIL PROTECTED]> writes: > > But if there are some records in t_table and we romove WHERE 1=0, we will > > have > > ERROR: wrong record type supplied in RETURN NEXT CONTEXT: PL/pgS

Re: [BUGS] Bug with FOR ... LOOP and composite types

2008-09-01 Thread Tom Lane
"Oleg Serov" <[EMAIL PROTECTED]> writes: > But if there are some records in t_table and we romove WHERE 1=0, we will > have > ERROR: wrong record type supplied in RETURN NEXT CONTEXT: PL/pgSQL function > "t_func" line 9 at RETURN NEXT I couldn't reproduce that here, at least not with versions newe

Re: [BUGS] Bug with FOR ... LOOP and composite types

2008-09-01 Thread Oleg Serov
But if there are some records in t_table and we romove WHERE 1=0, we will have ERROR: wrong record type supplied in RETURN NEXT CONTEXT: PL/pgSQL function "t_func" line 9 at RETURN NEXT 2008/9/1 Pavel Stehule <[EMAIL PROTECTED]> > Hello > > 2008/9/1 Oleg Serov <[EMAIL PROTECTED]>: > > Hello. > >

Re: [BUGS] Bug with FOR ... LOOP and composite types

2008-09-01 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2008/9/1 Oleg Serov <[EMAIL PROTECTED]>: >> Seems there is an error when I try to use a table with one field - composite >> type, when SELECT QUERY in FOR ... LOOP instruction returns empty result. > ROWTYPE is problem. I think it actually is a bug.

Re: [BUGS] Bug with FOR ... LOOP and composite types

2008-09-01 Thread Pavel Stehule
Hello 2008/9/1 Oleg Serov <[EMAIL PROTECTED]>: > Hello. > > Seems there is an error when I try to use a table with one field - composite > type, when SELECT QUERY in FOR ... LOOP instruction returns empty result. > Here are steps to reproduce: > > CREATE TYPE "t_type" AS ( > "a" BIGINT > ); > > CR

[BUGS] Bug with FOR ... LOOP and composite types

2008-09-01 Thread Oleg Serov
Hello. Seems there is an error when I try to use a table with one field - composite type, when SELECT QUERY in FOR ... LOOP instruction returns empty result. Here are steps to reproduce: CREATE TYPE "t_type" AS ( "a" BIGINT ); CREATE TABLE"t_table" ( "id" BIGINT NOT NULL, "t" "t_type", CONSTRAIN