Re: query ... returned 4 columns - Mailing list pgsql-general

From Sorin Schwimmer
Subject Re: query ... returned 4 columns
Date
Msg-id 510473.69894.qm@web56004.mail.re3.yahoo.com
Whole thread Raw
In response to query ... returned 4 columns  (Sorin Schwimmer <sxn02@yahoo.com>)
Responses Re: query ... returned 4 columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Thank you, indeed

SELECT * INTO o ...

solves it.

One last question, if I may:
both expected_stuff and archive.expected_stuff are
defined as:

( source CHAR(2);
  warehouse CHAR(1);
  stuff SMALLINT;
  packslip CHAR(12)
);

and o is expected_stuff%ROWTYPE

Having the same structure, I put
INSERT INTO archive.expected_stuff VALUES(o);

but it doesn't work. Instead, I had to rewrite as
INSERT ... VALUES (o.source,o.warehouse...);

Is the short version not supposed to work, or am I
using the wrong syntax?

Thanks again,
Sorin



____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

pgsql-general by date:

Previous
From: Stefan Berglund
Date:
Subject: Is This A Set Based Solution?
Next
From: Monika Cernikova
Date:
Subject: index bloat problem