Re: query ... returned 4 columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sorin Schwimmer <sxn02(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query ... returned 4 columns
Date: 2007-03-08 16:08:04
Message-ID: 8071.1173370084@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorin Schwimmer <sxn02(at)yahoo(dot)com> writes:
> DECLARE
> o expected_stuff%ROWTYPE;
> BEGIN
> o:= * FROM expected_stuff WHERE packslip=$1; --

Use
SELECT * INTO o FROM expected_stuff WHERE ...

The assignment syntax is currently only supported for scalar values,
I believe.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ted Byers 2007-03-08 16:15:52 Re: OT: Canadian Tax Database
Previous Message Richard Huxton 2007-03-08 16:07:32 Re: query ... returned 4 columns