From: | "Andrey G(dot)" <andvgal(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5776: Unable to create view with parameter in PL/pgsql |
Date: | 2010-12-13 21:28:55 |
Message-ID: | AANLkTi=8CqUQCTAF3u+LcMehFwHZz8q8iUJ+JhzW0KUp@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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 = $1
^
QUERY: CREATE VIEW v4 AS SELECT * FROM t1 WHERE some_field = $1
CONTEXT: PL/pgSQL function "bug_create_tmp_view_exec_test" line 3 at
EXECUTE statement
Andrey
2010/12/13 Robert Haas <robertmhaas(at)gmail(dot)com>
>
> On Tue, Nov 30, 2010 at 4:43 PM, Andrey Galkin <andvgal(at)gmail(dot)com> wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference: 5776
> > Logged by: Andrey Galkin
> > Email address: andvgal(at)gmail(dot)com
> > PostgreSQL version: 9.0.1
> > Operating system: Debian unstable
> > Description: Unable to create view with parameter in PL/pgsql
> > Details:
> >
> > Below is simple test case. Perhaps, I'm doing something wrong.
>
> You can accomplish what you're trying to do using EXECUTE.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
pgbug_5776.sql | application/x-sql | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jorge Augusto Meira | 2010-12-14 01:46:37 | Re: Problems with max_connections parameter |
Previous Message | Robert Haas | 2010-12-13 16:42:32 | Re: variadic flag doesn't work with "any" type |