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

From David G. Johnston
Subject Re: function INPUT as whole table
Date
Msg-id CAKFQuwZHBrbS89GJhZnaUjPLtYcOLkiiRSBYo=MD0uMEdJYMhw@mail.gmail.com
Whole thread Raw
In response to function INPUT as whole table  (Yambu <hyambu@gmail.com>)
Responses Re: function INPUT as whole table
Re: function INPUT as whole table
List pgsql-sql

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: Yambu
Date:
Subject: function INPUT as whole table
Next
From: Tom Lane
Date:
Subject: Re: function INPUT as whole table