Re: access computed field of RECORD variable

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: access computed field of RECORD variable
Дата
Msg-id b42b73151001050653i2c523c49v5a763679e3d8331a@mail.gmail.com
обсуждение исходный текст
Ответ на access computed field of RECORD variable  (Steve White <swhite@aip.de>)
Ответы Re: access computed field of RECORD variable  (Steve White <swhite@aip.de>)
Список pgsql-general
On Tue, Jan 5, 2010 at 8:53 AM, Steve White <swhite@aip.de> wrote:
> Hi,
>
> I ran into a roadblock at the very bottom of a fairly large database
> design implementation.  It will be at least messy to fix, unless there is
> a neat solution.
>
> The roadblock is:
>
> There is a record, which may be from any of a set of similar databases.
> Field names for this record are computed as strings.  Using these strings,
> I need to access fields of the record.
>
> But I can't find the syntax for it.
>
> Now, if a record variable is a known row type, I can get a field of a
> computed name.
> For a generic RECORD I can get a field by putting an explicit name the code,
>        (rec).FieldName1
> But can one get the value of a computed field from a generic RECORD?
>

why are you using generic records then? :-)  Maybe there is an elegant
solution to your issue with a bit more context.

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Some issues about data type convert
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: Shall I use PostgreSQL Array Type in The Following Case