return types in functions

From: "Brett W(dot) McCoy" <bmccoy(at)lan2wan(dot)com>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: return types in functions
Date: 1999-03-03 20:02:50
Message-ID: Pine.BSI.3.91.990303145728.25905E-100000@access1.lan2wan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a function that inserts to columns into a table based upon the
result of a query from another table. The problem is, I can't seem to
figure out what the proper return type is for this function. Since it
doesn't retrieve anything, I can't return anything like that. Here's the
function creation statement (without the return type):

CREATE FUNCTION insert_unknown_mfr(varchar)
RETURNS ??
AS
'INSERT INTO unknown_mfr
SELECT DISTINCT manufacturer, drugname
FROM drugs
WHERE manufacturer = $1'
LANGUAGE 'sql;

Brett W. McCoy
http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
Accuracy, n.:
The vice of being right

----- BEGIN GEEK CODE BLOCK -----
Version: 3.12
GAT dpu s:-- a C++++ UL++++$ P+ L+++ E W++ N- o K- w--- O@ M-@ !V PS+++
PE Y+ PGP- t++ 5- X+ R+@ tv b+++ DI+++ D+ e>++ h+ r++ y++++
------ END GEEK CODE BLOCK ------

Browse pgsql-sql by date

  From Date Subject
Next Message Jackson, DeJuan 1999-03-03 21:49:02 FW: Trees in SQL
Previous Message Mario Jorge Nunes Filipe 1999-03-03 17:21:03 A dillema ...