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

From David Durst
Subject Re: LONG - Question on dealing w/ numerics
Date
Msg-id 36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com
Whole thread Raw
In response to Re: LONG - Question on dealing w/ numerics  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: LONG - Question on dealing w/ numerics  (Tom Lane <tgl@sss.pgh.pa.us>)
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?
Just to let you know, changing ltype to line_type fixed the problem.

But I still think your point about the function selecting more than
one line is valid.

The problem is, the journal_line_id is not created until the insert
occurs and there is no other unique ident than the journal_line_id.




pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Cross-table constraints
Next
From: Bruno Wolff III
Date:
Subject: Re: converting microsoft sql server 2000 sql-code for postgresql