agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yambu <hyambu@gmail.com>
Cc: pgsql-sql <pgsql-sql@lists.postgresql.org>
Subject: Re: function INPUT as whole table
Date: Tue, 15 Jun 2021 09:33:28 -0400
Message-ID: <354524.1623764008@sss.pgh.pa.us> (raw)
In-Reply-To: <CALhHtcAGqGgCDKYg5rgwxqjXDhJnAH+qYxFDAya2Jn4CWxSV1A@mail.gmail.com>
References: <CALhHtcAGqGgCDKYg5rgwxqjXDhJnAH+qYxFDAya2Jn4CWxSV1A@mail.gmail.com>

Yambu <hyambu@gmail.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





view thread (7+ messages)  latest in thread

Message-ID: <354524.1623764008@sss.pgh.pa.us>
Permalink:  ../354524.1623764008@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/354524.1623764008@sss.pgh.pa.us

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: tgl@sss.pgh.pa.us, hyambu@gmail.com, pgsql-sql@lists.postgresql.org
  Subject: Re: function INPUT as whole table
  In-Reply-To: <354524.1623764008@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox