Re: function parameters

From: James Cloos <cloos(at)jhcloos(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: function parameters
Date: 2006-09-11 03:08:20
Message-ID: m34pvfnlqc.fsf@lugabout.jhcloos.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

>>>>> "Richard" == Richard Broersma <rabroersma(at)yahoo(dot)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(at)jhcloos(dot)com> OpenPGP: 0xED7DAEA6

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Karsten Hoffrath 2006-09-11 11:15:51 Problem with triggers and cursors
Previous Message James Cloos 2006-09-11 03:04:08 Re: defaults referencing other columns?