Re: function INPUT as whole table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: function INPUT as whole table
Date: 2021-06-15 13:33:28
Message-ID: 354524.1623764008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Yambu <hyambu(at)gmail(dot)com> writes:
> Is it possible to have as input to a function , a whole table contents, if
> the table is a small lookup table?

Not directly, but you might be able to achieve the effect by opening a
cursor and passing the cursor name to the function, which could fetch
from it. See the examples in the cursor section of the plpgsql manual.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Viswanatha Sastry 2021-06-15 14:01:39 Re: function INPUT as whole table
Previous Message David G. Johnston 2021-06-15 12:41:07 Re: function INPUT as whole table