Re: [BUGS] BUG #5776: Unable to create view with parameter in PL/pgsql

2010-12-14 Thread Andrey G.
Robert, Yes, you've read my mind about quote_literal() ;). The bug report is rising exactly the parameter substitution issue. Andrey 2010/12/14 Robert Haas : > On Mon, Dec 13, 2010 at 4:28 PM, Andrey G. wrote: >> It seems my original test, which also includes the EXECUTE approa

Re: [BUGS] BUG #5776: Unable to create view with parameter in PL/pgsql

2010-12-14 Thread Andrey G.
OK. Thanks, Andrey. 2010/12/14 Pavel Stehule : > Hello > > 2010/12/14 Andrey G. : >> Pavel, >> >> As far as I'm aware, SETOF return creates whole result in memory, what >> has some implications. >> > > it's not true for immutable SQL funct

Re: [BUGS] BUG #5776: Unable to create view with parameter in PL/pgsql

2010-12-14 Thread Andrey G.
rametrized_view(10); >                          QUERY PLAN > -- >  Index Scan using aa on foo  (cost=0.00..8.27 rows=1 width=4) >   Index Cond: (a = 10) > (2 rows) > > Regards > > Pavel Stehule > > > 2010/12/13 Andrey G. : >> It seems my original test, which a

Re: [BUGS] BUG #5776: Unable to create view with parameter in PL/pgsql

2010-12-14 Thread Andrey G.
It seems my original test, which also includes the EXECUTE approach, has not come to you in full. EXECUTE statement also fails with parameter: The test is attached in file. psql -q < db/db/pgbug_5776.sql ERROR:  there is no parameter $1 LINE 1: CREATE VIEW v4 AS SELECT * FROM t1 WHERE some_field =

Re: [BUGS] BUG #5757: PL/PGSQL composite variable field error reporting

2010-11-18 Thread Andrey G.
No problem, please find a simple test case with its execution result below: -- START TRANSACTION; CREATE TYPE CompositeType AS (     existing_field TEXT ); -- CREATE FUNCTION Bug_5757_test()     RETURNS VOID AS $$ DECLA