From: | <soumik(dot)bhattacharjee(at)kpn(dot)com> |
---|---|
To: | <laurenz(dot)albe(at)cybertec(dot)at>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | RE: Pseudocode / Pseudo-Types |
Date: | 2021-03-15 15:08:16 |
Message-ID: | 891d4eb7b3214be2ad31b1fa876fa885@kpn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
-----Original Message-----
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: maandag 15 maart 2021 15:15
To: Bhattacharjee, Soumik <soumik(dot)bhattacharjee(at)kpn(dot)com>; pgsql-admin(at)postgresql(dot)org
Subject: Re: Pseudocode / Pseudo-Types
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
Thanks for the information...
From | Date | Subject | |
---|---|---|---|
Next Message | soumik.bhattacharjee | 2021-03-15 15:08:46 | RE: Pseudocode / Pseudo-Types |
Previous Message | dbatoCloud Solution | 2021-03-15 15:05:31 | Looking for users & permission ! |