Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

From: Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Date: 2024-06-19 16:46:44
Message-ID: CACX+KaMore7Q-5QUQnTT5R0gKmsa_4jzqn+cmMaSwv6f2KWXCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi David,
Thanks for clarification
> I prefer TABLE. Using setof is more useful when the returned type is
predefined
But in the table also isn't the returned type predefined? Example:
CREATE FUNCTION fun1(integer)
RETURNS TABLE(
col1 integer,
col2 text
)
AS 'MODULE_PATHNAME', 'fun1'
LANGUAGE C;
We know the returned type will have two columns with type - integer and
text. Am I correct?

> Or a true record where the caller has to specify the shape.
Sorry but didn't get this shape part?

Thanks
Ayush Vatsa

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2024-06-19 16:50:44 Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Previous Message David G. Johnston 2024-06-19 16:14:41 Re: Proper format for pg_dump file date