Search Postgresql Archives

Re: The relative stability of different procedural languages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BigSmoke wrote:
On Dec 7, 11:07 pm, mmonc...@xxxxxxxxx ("Merlin Moncure") wrote:
On 7 Dec 2006 14:02:53 -0800, BigSmoke <bigsm...@xxxxxxxxx> wrote:

I'm facing a particular task for which I need any procedural language
but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use
local variables such as new and old from a dynamic command.

could you clarify what you are trying to do and why pl/pgsql cant do it?

I'm dealing with a trigger function which needs to check the nullness
of a column in 'new' and 'old'. The catch is that the trigger function
needs to take the name of that column as an argument. (I've tried a
kludge which stores 'new' and 'old' in a temporary table, but this
kludge seems too unreliable to trust.)

Why can't you just use something like this:

IF new.yourcolumnname IS NULL THEN


END IF;

I test for null in PLpgsql all the time.

Am I missing something?


Later,


Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux