Re: LONG - Question on dealing w/ numerics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ddurst(at)larubber(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: LONG - Question on dealing w/ numerics
Date: 2003-01-29 04:08:16
Message-ID: 19082.1043813296@sss.pgh.pa.us
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?

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Agnieszka Rutkowska 2003-01-29 04:25:39 extracting constraints from schema
Previous Message Rodger Donaldson 2003-01-29 03:13:36 Re: CSV import