pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Burke <michael@engtech.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Sub-query as function argument
Date: Tue, 20 Dec 2005 11:04:26 -0400
Message-ID: <200512201104.27152.michael@engtech.ca> (raw)
In-Reply-To: <c2d9e70e0512200652rf74a30ej6e8c274b7315a777@mail.gmail.com>
References: <200512200942.51624.michael@engtech.ca>
	<c2d9e70e0512200652rf74a30ej6e8c274b7315a777@mail.gmail.com>

On December 20, 2005 10:52 am, Jaime Casanova wrote:
> have you tried?

Yes:

=> SELECT my_func('Sample', NULL, SELECT MIN(year) FROM audio);
ERROR:  syntax error at or near "SELECT" at character 32

PostgreSQL 7.4.9, myfunc is pl/pgsql.

Just found a working method, though:

=> SELECT my_func('Sample', NULL, MIN(year)) FROM audio [ WHERE ... ];

-- 
Michael Burke
michael@engtech.ca



view thread (4+ messages)  latest in thread

Message-ID: <200512201104.27152.michael@engtech.ca>
Permalink:  ../200512201104.27152.michael@engtech.ca/
Also on:    postgresql.org/message-id/200512201104.27152.michael@engtech.ca

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: michael@engtech.ca
  Subject: Re: Sub-query as function argument
  In-Reply-To: <200512201104.27152.michael@engtech.ca>

* 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