From: soumik.bhattacharjee@kpn.com
To: laurenz.albe@cybertec.at
To: pgsql-admin@postgresql.org
Subject: RE: Pseudocode / Pseudo-Types
Date: Mon, 15 Mar 2021 15:08:16 +0000
Message-ID: <891d4eb7b3214be2ad31b1fa876fa885@kpn.com> (raw)
In-Reply-To: <f51661770a45ce6c28aa2a39badf2e7769853e42.camel@cybertec.at>
References: <7af47a45b89d4ce2bd4a03179e6bb373@kpn.com>
<f51661770a45ce6c28aa2a39badf2e7769853e42.camel@cybertec.at>
-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: maandag 15 maart 2021 15:15
To: Bhattacharjee, Soumik <soumik.bhattacharjee@kpn.com>; pgsql-admin@postgresql.org
Subject: Re: Pseudocode / Pseudo-Types
On Mon, 2021-03-15 at 13:55 +0000, soumik.bhattacharjee@kpn.com wrote:
> Has anybody has a use case for using Pseudocode / Pseudo-Types?
>
> Any inputs will be helpful and if any reference sites to check some example use cases are also good to start with.
>
> Thanks in advance...
Pseudocode, as in
while (there is something to do)
process_one_item();
is a tool to write down an algorithm in a way that is easy for programmers to understand.
Pseudo-types, as in
https://www.postgresql.org/docs/current/datatype-pseudo.html
are something entirely different.
Here is a useful example:
CREATE FUNCTION successor(anyelement) RETURNS anyelement
LANGUAGE sql AS 'SELECT $1 + 1';
SELECT successor(41);
successor
-----------
42
(1 row)
SELECT successor(current_date);
successor
------------
2021-03-16
(1 row)
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Thanks for the information...
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-admin@postgresql.org
Cc: soumik.bhattacharjee@kpn.com, laurenz.albe@cybertec.at
Subject: RE: Pseudocode / Pseudo-Types
In-Reply-To: <891d4eb7b3214be2ad31b1fa876fa885@kpn.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox