Re: dynamic field names in a function. - Mailing list pgsql-general

From Soma Interesting
Subject Re: dynamic field names in a function.
Date
Msg-id 5.0.2.1.0.20010330163715.022c3eb0@pop.telus.net
Whole thread Raw
In response to Re: dynamic field names in a function.  (will trillich <will@serensoft.com>)
Responses plperl -- postgresql married to perl  (will trillich <will@serensoft.com>)
List pgsql-general
At 05:47 PM 3/30/2001 -0600, you wrote:
>HOWEVER -- we do have arrays, don't forget... sometimes they can
>be bent to do more than intended (but usually not!)
>
>         create table mailing(
>                 person_id serial,
>                 sent int4[],
>                 prefs varchar[],
>                 current int2
>         );
>         -- insert, update, munge and frob, then
>         select person_id,sent[current] from something;
>
>--
>
>oh, and if your PostgreSQL instance is new enough, you might have
>PERL built in, which could make all of this moot. (now we just
>need someone to DOCUMENT the sucker so we know how perl can talk
>back to postgres for cross-lookups and such...)

Will, you are a powerful postgres wizard and never let anyone tell you
otherwise.

I may be able to use array's if postgres will allow using variables to
reference points in the array.

As for your comment about perl being built in, how can I find this out? I
guess just try CREATE LANGUAGE specifying perl?


pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: dynamic field names in a function.
Next
From: will trillich
Date:
Subject: Re: function to operate on same fields, different records?