Re: [GENERAL] Record as a parameter to a function

2005-04-22 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Fuhr wrote: | On Fri, Apr 22, 2005 at 03:31:59AM +0100, Carlos Correia wrote: | |>Michael Fuhr wrote: |>| On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote: |>| |>|>carlos=# insert into test (c1) values( 'test'); |>|>ERROR: NEW use

Re: [GENERAL] Record as a parameter to a function

2005-04-22 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 03:31:59AM +0100, Carlos Correia wrote: > Michael Fuhr wrote: > | On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote: > | > |>carlos=# insert into test (c1) values( 'test'); > |>ERROR: NEW used in query that is not in a rule > |>CONTEXT: PL/pgSQL function "tfte

Re: [GENERAL] Record as a parameter to a function

2005-04-21 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Fuhr wrote: | On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote: | |>carlos=# insert into test (c1) values( 'test'); |>ERROR: NEW used in query that is not in a rule |>CONTEXT: PL/pgSQL function "tftest" line 2 at perform | | | Po

Re: [GENERAL] Record as a parameter to a function

2005-04-21 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote: > > carlos=# insert into test (c1) values( 'test'); > ERROR: NEW used in query that is not in a rule > CONTEXT: PL/pgSQL function "tftest" line 2 at perform PostgreSQL 8.0 and later have improved support for composite types. Here's

[GENERAL] Record as a parameter to a function

2005-04-21 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I would like to write a trigger that will do complex calculations on a row, so the idea is to slipt the work throught several functions, and as the row has 23 fields, it's not an option to pass them one by one, so I tried to pass the record itself (