Re: LONG - Question on dealing w/ numerics

From: "David Durst" <ddurst(at)larubber(dot)com>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: LONG - Question on dealing w/ numerics
Date: 2003-01-29 09:17:51
Message-ID: 36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> "David Durst" <ddurst(at)larubber(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Moritz Lennert 2003-01-29 09:21:20 plpgsql: return results of a dynamic query
Previous Message Tom Lane 2003-01-29 09:01:39 Re: LONG - Question on dealing w/ numerics