[GENERAL] Passing RECORD variable from func1() to func2()

2004-09-06 Thread Henry Combrinck
Hello Hopefully someone can shed some light on the following issue. After chatting at irc.freenode.net/#postgresql, without success, this is my last effort before giving up and using a temp table. Essentially, I would like to pass a RECORD variable from one function to another using plpgsql:

Re: [GENERAL] Passing RECORD variable from func1() to func2()

2004-09-06 Thread Tom Lane
Henry Combrinck [EMAIL PROTECTED] writes: Essentially, I would like to pass a RECORD variable from one function to another using plpgsql: func2(record) You can't declare a plpgsql function that accepts RECORD; this is simply not supportable. (For one thing, which actual record types should

Re: [GENERAL] Passing RECORD variable from func1() to func2()

2004-09-06 Thread Henry Combrinck
Henry Combrinck [EMAIL PROTECTED] writes: Essentially, I would like to pass a RECORD variable from one function to another using plpgsql: func2(record) You can't declare a plpgsql function that accepts RECORD; this is simply not supportable. (For one thing, which actual record types

Re: [GENERAL] Passing RECORD variable from func1() to func2()

2004-09-06 Thread Tom Lane
Henry Combrinck [EMAIL PROTECTED] writes: Can you give an example of what a named rowtype is? The result of CREATE TYPE AS, or the row type implicitly created for a table. For instance CREATE TYPE complex AS (r float, i float); CREATE FUNCTION abs(complex) RETURNS float AS ...

Re: [GENERAL] Passing RECORD variable from func1() to func2()

2004-09-06 Thread Alvaro Herrera
On Mon, Sep 06, 2004 at 10:39:54PM +0200, Henry Combrinck wrote: Can you give an example of what a named rowtype is? Are you refering to creating some kind of custom TYPE, and then passing that to func2(custom_type_row)? You can use a table's rowtype, that is, a type that has the name of the