From: | Richard H <dev(at)archonet(dot)com> |
---|---|
To: | datactrl <quals(at)bigfoot(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: SOME PL/PGSQL PROBLEMS |
Date: | 2001-03-23 13:46:25 |
Message-ID: | 20010323.13462500@client.archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 3/23/01, 9:10:16 AM, datactrl <quals(at)bigfoot(dot)com> wrote regarding [SQL]
SOME PL/PGSQL PROBLEMS:
Sorry, can't reproduce this at all Jack
> I found there are some problems with PL/pgSQL.
> 1) 'Drop Table' doesn't work at all
No problems in 7.1, can't remember about previous versions
> 2) '--' comment causes parsing error
No problems ever AFAIK
> 3) Execute doesn't work at all. It always causes parsing error!
I know this is only in 7.1, not in earlier versions
> Some questions
> 1) Can I use variable in FROM clause for a table name?
No - afraid not. Queries are pre-compiled as I understand it, although
this is possible in pltcl (and plperl I think).
> 2) Can I use variable in WHERE such as xxx = variable?
Yes, exactly as you show
> JACK
Take a look at http://www.brasileiro.net/postgres/ for some example
plpgsql functions or check http://techdocs.postgresql.org or Bruce's book
at http://www.postgresql.org/docs/awbook.html
If you have a specific example, please post it with the version of PG you
are running.
HTH
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Johannes Grødem | 2001-03-23 13:50:43 | Re: Foreign key referencing subclasses. |
Previous Message | postgresql | 2001-03-23 13:16:26 | Re: creating "job numbers" |