Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8B1B0479B91 for ; Tue, 28 Jan 2003 23:45:12 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 166B8477565 for ; Tue, 28 Jan 2003 23:08:15 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0T48H5u019083; Tue, 28 Jan 2003 23:08:17 -0500 (EST) To: ddurst@larubber.com Cc: pgsql-sql@postgresql.org Subject: Re: LONG - Question on dealing w/ numerics In-reply-to: <34281.216.86.192.34.1043801682.squirrel@www.la-rubber.com> References: <34281.216.86.192.34.1043801682.squirrel@www.la-rubber.com> Comments: In-reply-to "David Durst" message dated "Tue, 28 Jan 2003 16:54:42 -0800" Date: Tue, 28 Jan 2003 23:08:16 -0500 Message-ID: <19082.1043813296@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/457 X-Sequence-Number: 11322 "David Durst" writes: > insert into journal_lines (entry_id,account_id,line_type,line_amount) > values (eid,aid,ltype,amount); > select into line * from journal_lines where entry_id = eid AND > account_id = aid AND ltype = ltype; I bet that last should be line_type = ltype? One thing you have to watch with plpgsql's SELECT INTO is that it doesn't complain if the WHERE would match multiple rows. You get one of the rows, and no indication that others would have matched. regards, tom lane