public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ayush Vatsa <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected]
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Date: Wed, 19 Jun 2024 22:16:44 +0530
Message-ID: <CACX+KaMore7Q-5QUQnTT5R0gKmsa_4jzqn+cmMaSwv6f2KWXCQ@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwbtbhkbw439S3_UbraTpyHfQGxdjjhBBUbfKPd4PVC+xg@mail.gmail.com>
References: <CACX+KaPBaSW+0PyMC7dmY6W9W8mPSbWpkJRhAOQOC9Qb0TjCQA@mail.gmail.com>
<CAKFQuwbtbhkbw439S3_UbraTpyHfQGxdjjhBBUbfKPd4PVC+xg@mail.gmail.com>
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
view thread (8+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
In-Reply-To: <CACX+KaMore7Q-5QUQnTT5R0gKmsa_4jzqn+cmMaSwv6f2KWXCQ@mail.gmail.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