Re: LONG - Question on dealing w/ numerics - Mailing list pgsql-sql

From Tom Lane
Subject Re: LONG - Question on dealing w/ numerics
Date
Msg-id 19082.1043813296@sss.pgh.pa.us
Whole thread Raw
In response to LONG - Question on dealing w/ numerics  ("David Durst" <ddurst@larubber.com>)
Responses Re: LONG - Question on dealing w/ numerics
List pgsql-sql
"David Durst" <ddurst@larubber.com> 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


pgsql-sql by date:

Previous
From: "Rodger Donaldson"
Date:
Subject: Re: CSV import
Next
From: "Luke Pascoe"
Date:
Subject: checking data integrity in a recursive table