Search Postgresql Archives

Re: access computed field of RECORD variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 5, 2010 at 8:53 AM, Steve White <swhite@xxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux