Re: How to assemble all fields of (any) view into a string? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to assemble all fields of (any) view into a string?
Date
Msg-id 9e111b5f-af14-a047-23fc-a5c974b5104c@aklaver.com
Whole thread Raw
In response to Re: How to assemble all fields of (any) view into a string?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List 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.klaver@aklaver.com


pgsql-general by date:

Previous
From: Ken Tanzer
Date:
Subject: Re: How to assemble all fields of (any) view into a string?
Next
From: Jim Nasby
Date:
Subject: Re: Clustered index to preserve data locality in a multitenant application?