Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 021759F9C14 for ; Mon, 13 Aug 2007 17:46:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 07254-04 for ; Mon, 13 Aug 2007 17:46:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by postgresql.org (Postfix) with ESMTP id A4A569F95F1 for ; Mon, 13 Aug 2007 17:46:18 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id f1so1103144rvb for ; Mon, 13 Aug 2007 13:46:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KBvGuEiOQhf6lVfN2MnXQuQTgQDvsSJB9UlVLtsEh5YJEMtTMjQskldM0/ViDL+FvPdKbuuhZN7RdUmgxEQGUX60pyM3gMoy4T8dND+CJHBGegnZJKBq7FmAbBWl747vqAypX6x9dMEgDTgzL/M9w6XpHguHuudO54IjkC6fKJs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=I4Rp1dL8ofWQ0L/3koujHlrIbbtR+nVAbIUw9xs8u7LOJfHaQHtHRJXtGY7OW06Gr5lohfcmWqwYsJ/y9yWAZ2a7okl4Jum9GteIvuaWoI6mBnfxX0C7Xrvdm+ZUA4A1VaKWbciTU0EdFLpOVIHRb1xc6LCfkvWJ4UWpzQpVKCc= Received: by 10.141.63.20 with SMTP id q20mr2722489rvk.1187037977016; Mon, 13 Aug 2007 13:46:17 -0700 (PDT) Received: by 10.141.98.12 with HTTP; Mon, 13 Aug 2007 13:46:17 -0700 (PDT) Message-ID: Date: Mon, 13 Aug 2007 15:46:17 -0500 From: "Scott Marlowe" To: "Hyatt, Gordon" Subject: Re: plpgsql question/problem Cc: pgsql-admin@postgresql.org In-Reply-To: <8EA62D1B324F0A438A36E8B5F0848EB808184C@jdcmail1.joslin.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8EA62D1B324F0A438A36E8B5F0848EB808184C@jdcmail1.joslin.harvard.edu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/140 X-Sequence-Number: 26471 On 8/13/07, Hyatt, Gordon 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