From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Steve White <swhite(at)aip(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: access computed field of RECORD variable |
Date: | 2010-01-05 14:53:39 |
Message-ID: | b42b73151001050653i2c523c49v5a763679e3d8331a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jan 5, 2010 at 8:53 AM, Steve White <swhite(at)aip(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gauthier, Dave | 2010-01-05 15:00:46 | Re: Shall I use PostgreSQL Array Type in The Following Case |
Previous Message | Sam Mason | 2010-01-05 14:51:27 | Re: Some issues about data type convert |