| From: | Sorin Schwimmer <sxn02(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | query ... returned 4 columns |
| Date: | 2007-03-07 23:30:12 |
| Message-ID: | 575461.48561.qm@web56008.mail.re3.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi All,
I'm trying to write a stored PLPG/SQL procedure:
CREATE OR REPLACE FUNCTION
arch_expected_stuff(CHAR(12)) RETURNS VOID
AS $$
-- Archives expected_stuff
-- takes packing slip
DECLARE
o expected_stuff%ROWTYPE;
BEGIN
o:= * FROM expected_stuff WHERE packslip=$1; --
LIMIT 1;
INSERT INTO archive.expected_stuff VALUES (o);
DELETE FROM expected_stuff WHERE packslip=$1;
END;
$$ LANGUAGE PLPGSQL;
When I issue a
select arch_expected_stuff('246');
I receive the following error:ERROR: query "SELECT *
FROM expected_stuff WHERE packslip= $1 LIMIT 1"
returned 4 columns
CONTEXT: PL/pgSQL function "arch_expected_stuff" line
6 at assignment
Yes, both expected_stuff and archive.expected_stuff
have 4 columns. What is the error?
Thanks for your help,
Sorin
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
| From | Date | Subject | |
|---|---|---|---|
| Next Message | araza | 2007-03-08 00:00:14 | How to force planner to use GiST index? |
| Previous Message | Simon Riggs | 2007-03-07 22:03:16 | Re: [HACKERS] WITH/RECURSIVE plans |