Re: function parameters - Mailing list pgsql-novice

From James Cloos
Subject Re: function parameters
Date
Msg-id m34pvfnlqc.fsf@lugabout.jhcloos.org
Whole thread Raw
In response to Re: function parameters  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-novice
>>>>> "Richard" == Richard Broersma <rabroersma@yahoo.com> writes:

>> Is it possible for funtions to have named parameters rather than just
>> positional parameters?

Richard> I am not sure that every procedural language is the same, but with plpgsql:
Richard> www.postgresql.org/docs/8.1/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-ALIASES

I meant to reply again to this.

I wound up with a staging table with a before trigger which calls the
function.  So, instead of "SELECT foobar()" I "INSERT INTO staging".
The columns of staging are what the arguments to foobar() would have
been, and foobar gets the data from OLD (or $_TD->{new} in plperl¹).

Thanks again.  The hint led me to the fountain.

-JimC

¹ cf my post in docs about $_TD->{old}

--
James Cloos <cloos@jhcloos.com>         OpenPGP: 0xED7DAEA6

pgsql-novice by date:

Previous
From: Daniel Staal
Date:
Subject: Re: install pgadmin3 on suse10
Next
From: James Cloos
Date:
Subject: Re: defaults referencing other columns?