From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | soumik(dot)bhattacharjee(at)kpn(dot)com, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Pseudocode / Pseudo-Types |
Date: | 2021-03-15 14:14:34 |
Message-ID: | f51661770a45ce6c28aa2a39badf2e7769853e42.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, 2021-03-15 at 13:55 +0000, soumik(dot)bhattacharjee(at)kpn(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | dbatoCloud Solution | 2021-03-15 15:05:31 | Looking for users & permission ! |
Previous Message | Pepe TD Vo | 2021-03-15 14:13:24 | Re: Pseudocode / Pseudo-Types |