agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Viswanatha Sastry <medipalli@yahoo.com>
To: Yambu <hyambu@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-sql <pgsql-sql@lists.postgresql.org>
Subject: Re: function INPUT as whole table
Date: Tue, 15 Jun 2021 14:01:39 +0000 (UTC)
Message-ID: <600227525.301090.1623765699598@mail.yahoo.com> (raw)
In-Reply-To: <CAKFQuwZHBrbS89GJhZnaUjPLtYcOLkiiRSBYo=MD0uMEdJYMhw@mail.gmail.com>
References: <CALhHtcAGqGgCDKYg5rgwxqjXDhJnAH+qYxFDAya2Jn4CWxSV1A@mail.gmail.com>
<CAKFQuwZHBrbS89GJhZnaUjPLtYcOLkiiRSBYo=MD0uMEdJYMhw@mail.gmail.com>
You can send it as a json object from App. in PostgreSQL it will be string datatype as parameter and you can insert into a temp table with json function.
Thanks & Regards Viswanatha Shastry M. Hyderabad, Phone Mobile : 9493050037
On Tuesday, 15 June, 2021, 06:11:20 pm IST, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Tuesday, June 15, 2021, Yambu <hyambu@gmail.com> wrote:
Hello
Is it possible to have as input to a function , a whole table contents, if the table is a small lookup table?
Something like this
CREATE or replace function test (IN (select * from table1) )
No. Function arguments are data types, not contents. Queries go inside the function body.
David J.
view thread (7+ messages) latest in thread
Message-ID: <600227525.301090.1623765699598@mail.yahoo.com>
Permalink: ../600227525.301090.1623765699598@mail.yahoo.com/
Also on: postgresql.org/message-id/600227525.301090.1623765699598@mail.yahoo.com
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: medipalli@yahoo.com, hyambu@gmail.com, david.g.johnston@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: function INPUT as whole table
In-Reply-To: <600227525.301090.1623765699598@mail.yahoo.com>
* 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