From: Brett W. McCoy <bmccoy@lan2wan.com>
To: pgsql-sql@postgreSQL.org
Subject: return types in functions
Date: Wed, 3 Mar 1999 15:02:50 -0500 (EST)
Message-ID: <Pine.BSI.3.91.990303145728.25905E-100000@access1.lan2wan.com> (raw)
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 ------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bmccoy@lan2wan.com
Subject: Re: return types in functions
In-Reply-To: <Pine.BSI.3.91.990303145728.25905E-100000@access1.lan2wan.com>
References: <Pine.BSI.3.91.990303145728.25905E-100000@access1.lan2wan.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox