Re: function INPUT as whole table - Mailing list pgsql-sql

From Yambu
Subject Re: function INPUT as whole table
Date
Msg-id CALhHtcAhzpRhwTNtVpO9HVuugY6pD=2pSF2jgzwLEOTzPCBuqw@mail.gmail.com
Whole thread Raw
In response to Re: function INPUT as whole table  (Viswanatha Sastry <medipalli@yahoo.com>)
Responses Re: function INPUT as whole table
List pgsql-sql
ok, thank you all

On Tue, Jun 15, 2021 at 4:01 PM Viswanatha Sastry <medipalli@yahoo.com> wrote:
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.
 
 

pgsql-sql by date:

Previous
From: Viswanatha Sastry
Date:
Subject: Re: function INPUT as whole table
Next
From: Дмитрий Иванов
Date:
Subject: Re: function INPUT as whole table