Search Postgresql Archives

Return cols and rows via stored procedure

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

 



I'd like a stored procedure which does something like:

INSERT INTO...
SELECT... -- This should be returned as multicolumn, multifield - just
like a table or view

When I run it, though, instead of getting a table, I get one field
with all the data in it as a compound type.  I'd like to return the
results just like a view.

How do I do that?

Additionally, I'd like to put a:
DELETE...
at the end, but still return the SELECT (i.e. what SELECT said before
the DELETE).  Is that possible?

Finally, my preference is to do all this in a SQL stored procedure,
not PL/pgSQL or PL/anythingelse.

Thanks!


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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