Re: query ... returned 4 columns

From: Sorin Schwimmer <sxn02(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: query ... returned 4 columns
Date: 2007-03-09 15:53:40
Message-ID: 510473.69894.qm@web56004.mail.re3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Downs 2007-03-09 16:02:45 Re: HIPPA (was Re: Anyone know ...)
Previous Message Jorge Godoy 2007-03-09 15:41:28 Re: one-to-one schema design question and ORM