pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Durst <ddurst@larubber.com>
To: tgl@sss.pgh.pa.us
Cc: pgsql-sql@postgresql.org
Subject: Re: LONG - Question on dealing w/ numerics
Date: Wed, 29 Jan 2003 01:17:51 -0800 (PST)
Message-ID: <36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com> (raw)
In-Reply-To: <19082.1043813296@sss.pgh.pa.us>
References: <34281.216.86.192.34.1043801682.squirrel@www.la-rubber.com>
	<19082.1043813296@sss.pgh.pa.us>

> "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.





view thread (6+ messages)

Message-ID: <36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com>
Permalink:  ../36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com/
Also on:    postgresql.org/message-id/36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ddurst@larubber.com, tgl@sss.pgh.pa.us
  Subject: Re: LONG - Question on dealing w/ numerics
  In-Reply-To: <36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox