pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard H <dev@archonet.com>
To: datactrl <quals@bigfoot.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: SOME PL/PGSQL PROBLEMS
Date: Fri, 23 Mar 2001 13:46:25 GMT
Message-ID: <20010323.13462500@client.archonet.com> (raw)
In-Reply-To: <004f01c0b379$19c48c60$2400a8c0@hnjack>
References: <004f01c0b379$19c48c60$2400a8c0@hnjack>

On 3/23/01, 9:10:16 AM, datactrl <quals@bigfoot.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




view thread (3+ messages)  latest in thread

Message-ID: <20010323.13462500@client.archonet.com>
Permalink:  ../20010323.13462500@client.archonet.com/
Also on:    postgresql.org/message-id/20010323.13462500@client.archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, quals@bigfoot.com
  Subject: Re: SOME PL/PGSQL PROBLEMS
  In-Reply-To: <20010323.13462500@client.archonet.com>
  References: <004f01c0b379$19c48c60$2400a8c0@hnjack> <20010323.13462500@client.archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox