Re: [GENERAL] Function Question

2011-12-08 Thread Tom Lane
Jake Stride writes: > I am trying to create a function that gets fired when a new row is > inserted. I can get the following function built but my problem is > that the sequence that is created is called "NEW.key" rather than the > value that is being inserted (it should be a UUID). Instead of th

[GENERAL] Function Question

2011-12-08 Thread Jake Stride
I am trying to create a function that gets fired when a new row is inserted. I can get the following function built but my problem is that the sequence that is created is called "NEW.key" rather than the value that is being inserted (it should be a UUID). I have tried putting the key into a variab

Re: [GENERAL] Function Question - Inserting into a table with foreign constraints

2011-11-05 Thread Raymond O'Donnell
On 05/11/2011 14:46, Brandon Phelps wrote: > > With the method you outlined will I notice any huge performance > impacts? The application would be parsing incoming data from another > 3rd party application and could, at times, be executing the function in > very fast succession, although never tw

Re: [GENERAL] Function Question - Inserting into a table with foreign constraints

2011-11-05 Thread David Johnston
On Nov 5, 2011, at 10:46, Brandon Phelps wrote: > On 11/5/2011 10:35 AM, Raymond O'Donnell wrote: >> On 05/11/2011 04:34, Brandon Phelps wrote > > With the method you outlined will I notice any huge performance impacts? The > application would be parsing incoming data from another 3rd party ap

Re: [GENERAL] Function Question - Inserting into a table with foreign constraints

2011-11-05 Thread Brandon Phelps
On 11/5/2011 10:35 AM, Raymond O'Donnell wrote: On 05/11/2011 04:34, Brandon Phelps wrote: Hello all, Could someone give me an example as to how I would accomplish something like this with a function?: 3 tables: tableA: id (serial), name (varchar), description (varchar), subcat_id (integer) t

Re: [GENERAL] Function Question - Inserting into a table with foreign constraints

2011-11-05 Thread Raymond O'Donnell
On 05/11/2011 04:34, Brandon Phelps wrote: > Hello all, > > Could someone give me an example as to how I would accomplish something > like this with a function?: > > 3 tables: > > tableA: id (serial), name (varchar), description (varchar), subcat_id > (integer) > tableB: id (serial), subcat_name

[GENERAL] Function Question - Inserting into a table with foreign constraints

2011-11-05 Thread Brandon Phelps
Hello all, Could someone give me an example as to how I would accomplish something like this with a function?: 3 tables: tableA: id (serial), name (varchar), description (varchar), subcat_id (integer) tableB: id (serial), subcat_name (varchar), cat_id (integer) tableC: id (serial), cat_name

Re: [GENERAL] function question

2008-06-21 Thread Decibel!
On Jun 21, 2008, at 8:06 AM, kevin kempter wrote: Hi LIst; Is there a way to print all the lines being executed for a function, like the equivelant of a psql -ef for an sql file ? No, but you could use a debugger on it if you're running a more recent version... -- Decibel!, aka Jim C. Nas

[GENERAL] function question

2008-06-21 Thread kevin kempter
Hi LIst; Is there a way to print all the lines being executed for a function, like the equivelant of a psql -ef for an sql file ? Thanks in advance -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/