[SQL] PLPGSQL question

2006-11-06 Thread Sorin Schwimmer
Hi All,I have a stored procedure that fails and don't know how to fix it, so I hope to find some help here.I works on a table called 'locations' that looks like this:design=# \d locations Table "public.locations"Column | Type | Modifiers-+--+-store |

[SQL] plpgsql question

2005-08-30 Thread Postgres Admin
Can I do something like this: CREATE TABLE sample (id SERIAL, node INTEGER, parent INTEGER); INSERT INTO sample(node,parent) VALUES(1,0); INSERT INTO sample(node,parent) VALUES(2,0); INSERT INTO sample(node,parent) VALUES(3,1); INSERT INTO sample(node,parent) VALUES(4,3) CREATE OR REPLACE

Re: [SQL] plpgsql question

2003-11-08 Thread Josh Berkus
Rich, I don't want to abuse you - so if this is the wrong forum for this, feel free to toss it back with direction :-) No, but I do think that you should CC a mailing list becuase: 1) Someone else may have direct experience with your problem and answer more quickly than me, and: 2) Other

Re: [SQL] plpgsql question

2003-11-08 Thread Josh Berkus
Rich, That was my thought - I was fairly sure I fixed it though. Do, really need to be specific in terms of type in terms of int, or can I put numeric, INT and numeric are fairly different, and I believe that SRF return types are very fussy about data types; I wouldn't be surprised if