pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Pseudocode / Pseudo-Types
5+ messages / 3 participants
[nested] [flat]

* Pseudocode / Pseudo-Types
@ 2021-03-15 13:55  soumik.bhattacharjee@kpn.com
  0 siblings, 2 replies; 5+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2021-03-15 13:55 UTC (permalink / raw)
  To: pgsql-admin

Hi Experts,

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...

Regards!!





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Pseudocode / Pseudo-Types
@ 2021-03-15 14:13  Pepe TD Vo <pepevo@yahoo.com>
  parent: soumik.bhattacharjee@kpn.com
  1 sibling, 1 reply; 5+ messages in thread

From: Pepe TD Vo @ 2021-03-15 14:13 UTC (permalink / raw)
  To: pgsql-admin; soumik.bhattacharjee@kpn.com <soumik.bhattacharjee@kpn.com>

there's an example from http://www.unf.edu.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

 

    On Monday, March 15, 2021, 09:56:12 AM EDT, soumik.bhattacharjee@kpn.com <soumik.bhattacharjee@kpn.com> wrote:  
 
 Hi Experts,

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...

Regards!!


  

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Pseudocode / Pseudo-Types
@ 2021-03-15 14:14  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: soumik.bhattacharjee@kpn.com
  1 sibling, 1 reply; 5+ messages in thread

From: Laurenz Albe @ 2021-03-15 14:14 UTC (permalink / raw)
  To: soumik.bhattacharjee@kpn.com; pgsql-admin

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






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: Pseudocode / Pseudo-Types
@ 2021-03-15 15:08  soumik.bhattacharjee@kpn.com
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 5+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2021-03-15 15:08 UTC (permalink / raw)
  To: laurenz.albe@cybertec.at; pgsql-admin



-----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...


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: Pseudocode / Pseudo-Types
@ 2021-03-15 15:08  soumik.bhattacharjee@kpn.com
  parent: Pepe TD Vo <pepevo@yahoo.com>
  0 siblings, 0 replies; 5+ messages in thread

From: soumik.bhattacharjee@kpn.com @ 2021-03-15 15:08 UTC (permalink / raw)
  To: pepevo@yahoo.com; pgsql-admin

Thanks …

From: Pepe TD Vo <pepevo@yahoo.com>
Sent: maandag 15 maart 2021 15:13
To: pgsql-admin@postgresql.org; Bhattacharjee, Soumik <soumik.bhattacharjee@kpn.com>
Subject: Re: Pseudocode / Pseudo-Types

there's an example from http://www.unf.<http://www.unf.edu>edu.

Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.[Emoji][Emoji][Emoji]
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success




On Monday, March 15, 2021, 09:56:12 AM EDT, soumik.bhattacharjee@kpn.com<mailto:soumik.bhattacharjee@kpn.com> <soumik.bhattacharjee@kpn.com<mailto:soumik.bhattacharjee@kpn.com>> wrote:


Hi Experts,

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...

Regards!!




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-03-15 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 13:55 Pseudocode / Pseudo-Types soumik.bhattacharjee@kpn.com
2021-03-15 14:13 ` Pepe TD Vo <pepevo@yahoo.com>
2021-03-15 15:08   ` soumik.bhattacharjee@kpn.com
2021-03-15 14:14 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-03-15 15:08   ` soumik.bhattacharjee@kpn.com

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