Search Postgresql Archives

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

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

 




On Wed, Sep 7, 2016 at 3:38 PM, Jim Nasby <Jim.Nasby@xxxxxxxxxxxxxx> 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.

OK, python is new to me, so I'm trying to dig into it.  I installed it, and tried declaring a function:

CREATE OR REPLACE FUNCTION ebh_transaction_assemble( varchar, record ) RETURNS varchar AS $$...

but got the same error:

ERROR:  PL/Python functions cannot accept type record

Is there some other way I should be specifying this?  Or do I need a more recent version of Postgres (I'm on 9.2) to do this?  Thanks.

 

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

[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