Re: How to assemble all fields of (any) view into a string?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to assemble all fields of (any) view into a string?
Date: 2016-09-07 23:08:41
Message-ID: 9e111b5f-af14-a047-23fc-a5c974b5104c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/07/2016 03:38 PM, Jim Nasby wrote:
> On 9/7/16 5:32 PM, Ken Tanzer wrote:
>> SELECT my_cat(ebh_gain,'ebh_gain') FROM ebh_gain;
>>
>> I know TCL and probably Python and others can work with a record as a
>> trigger function. But TCL doesn't seem to accept a record as an
>> argument. Can any of the other languages that could also accomplish
>> this function? Or some other way? Thanks.
>
> A PL that can accept composite types (such as plpythonu) should be able
> to do this.

But can they be anonymous types?

Ken wants this to be generic so any tables record can be supplied as an
argument. In plpythonu it seems you need to declare the table type when
supplying the record.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2016-09-07 23:11:25 Re: Clustered index to preserve data locality in a multitenant application?
Previous Message Ken Tanzer 2016-09-07 23:07:00 Re: How to assemble all fields of (any) view into a string?