Re: Asking for some PL/pgSQL Tips

From: Richard Huxton <dev(at)archonet(dot)com>
To: tankgirl(at)worldonline(dot)es
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Asking for some PL/pgSQL Tips
Date: 2001-07-31 18:15:22
Message-ID: 3B66F5BB.387A6EE9@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

tankgirl(at)worldonline(dot)es wrote:

> This is more or less what I'm trying to do...
>
> EXECUTE ''ALTER TABLE ''||name_table
> || '' ADD COLUMN '' || name_atrib || name_type;

Stick the text of this into a variable (say execsql) then you can do:

RAISE NOTICE execsql;
EXECUTE execsql;

Once I've got my patch to RAISE finished and accepted you won't need to
put it into a variable, but for the moment you have to.

My guess is you are missing a space between name_atrib and name_type,
but that's just a guess.

HTH

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Finn 2001-07-31 18:21:45 Re: Unexpected *ABORT STATE*
Previous Message Tom Lane 2001-07-31 18:11:00 Re: looking for a secure