Skip site navigation (1) Skip section navigation (2)

Re: variable-count stored proc arguements?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben <bench(at)silentmedia(dot)com>
Cc: "'Postgres General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: variable-count stored proc arguements?
Date: 2003-03-29 23:32:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Ben <bench(at)silentmedia(dot)com> writes:
> Is there such a thing?

No.  If you are working in C, it's possible to make multiple pg_proc
entries pointing to the same C function, but this is a tedious way to
do things; and it doesn't scale to large numbers of arguments.

> My guess is there isn't, but I'm trying to figure
> out how to encapsulate some "select where foo=a [and foo=b [and foo=c
> [...]]]" logic into a stored proc, and that would be an elegant way to
> do it.

Perhaps pass the a,b,c values as an array?

			regards, tom lane

In response to


pgsql-general by date

Next:From: BenDate: 2003-03-30 02:08:15
Subject: Re: variable-count stored proc arguements?
Previous:From: Tom LaneDate: 2003-03-29 23:29:06
Subject: Re: 7.3.2 Regression Failures Worth Looking Into

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group