query ... returned 4 columns
| От | Sorin Schwimmer |
|---|---|
| Тема | query ... returned 4 columns |
| Дата | |
| Msg-id | 575461.48561.qm@web56008.mail.re3.yahoo.com обсуждение |
| Ответы |
Re: query ... returned 4 columns
Re: query ... returned 4 columns |
| Список | 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
В списке pgsql-general по дате отправления: