Search Postgresql Archives

query ... returned 4 columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux