Sub-query as function argument - Mailing list pgsql-sql

From Michael Burke
Subject Sub-query as function argument
Date
Msg-id 200512200942.51624.michael@engtech.ca
Whole thread Raw
Responses Re: Sub-query as function argument  (Jaime Casanova <systemguards@gmail.com>)
Re: Sub-query as function argument  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Is it possible to execute a SELECT query as an argument to a function?

Example:

SELECT my_func('Sample', NULL, SELECT MIN(year) FROM audio);

In my particular case, my_func inserts columns into another table; I wish to 
use values from another table as the arguments.  The interior SELECT will 
return only a single value; perhaps it needs to be wrapped in another 
function?

TIA.
Mike.

-- 
Michael Burke
michael@engtech.ca


pgsql-sql by date:

Previous
From: Aarni Ruuhimäki
Date:
Subject: Re: Querying date_time for date only ?
Next
From: Jaime Casanova
Date:
Subject: Re: Sub-query as function argument