From: | "Hyatt, Gordon" <Gordon(dot)Hyatt(at)joslin(dot)harvard(dot)edu> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: plpgsql question/problem -- SOLVED |
Date: | 2007-08-14 14:11:40 |
Message-ID: | 8EA62D1B324F0A438A36E8B5F0848EB808184E@jdcmail1.joslin.harvard.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
I've found the problem - I didn't see a misplaced/extra quote_literal.
My bad!
Thanks for the help.
Gord
-----Original Message-----
From: Hyatt, Gordon
Sent: Tuesday, August 14, 2007 9:18 AM
To: pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] plpgsql question/problem
Scott and Tom,
Thanks for your replies. Yes, the missing select keyword was simply a typo on my part.
The code that I sent was simplified (I didn't include all the fields, most of which are character varying). I've spent all day yesterday trying to make it work. (I'm not sure if I mentioned this, but I using 8.2.4 on Win2000 SP4).
What else could be causing this code to correctly return the next sequence number but not insert anything into the table?
Thanks in advance,
Gord
-----Original Message-----
From: Scott Marlowe [mailto:scott(dot)marlowe(at)gmail(dot)com]
Sent: Monday, August 13, 2007 4:46 PM
To: Hyatt, Gordon
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] plpgsql question/problem
On 8/13/07, Hyatt, Gordon <Gordon(dot)Hyatt(at)joslin(dot)harvard(dot)edu> wrote:
>
> I'm not sure if this is the correct list for this question, but I'll give it a shot anyway. (If this is not the correct list, please suggest the correct one.)
CODE SNIPPED.
> When I attempt to run insert_a_and_b, insert_b fails with a foreign key violation.
I ran your exact same code and it worked fine. Note that I changed one line:
begin;
insert_a_and_b ('some text for a', 'some text for b');
commit;
became:
begin;
select insert_a_and_b ('some text for a', 'some text for b');
commit;
But I assume that's just a simple typo. I'm running pgsql 8.1.8
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2007-08-14 14:23:56 | Re: merge two rows where value are null |
Previous Message | Kevin Grittner | 2007-08-14 13:55:39 | Re: Downloading PostgreSQL source code version 7.1 through CVS |