Re: dynamic field names in a function.

Поиск
Список
Период
Сортировка
От Soma Interesting
Тема Re: dynamic field names in a function.
Дата
Msg-id 5.0.2.1.0.20010330163715.022c3eb0@pop.telus.net
обсуждение исходный текст
Ответ на Re: dynamic field names in a function.  (will trillich <will@serensoft.com>)
Ответы plperl -- postgresql married to perl
Список 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 по дате отправления:

Предыдущее
От: will trillich
Дата:
Сообщение: Re: dynamic field names in a function.
Следующее
От: will trillich
Дата:
Сообщение: Re: function to operate on same fields, different records?