pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
To: Ludwig Isaac Lim <ludz_lim@yahoo.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: print in plpython not appearing in logs
Date: Tue, 13 Dec 2022 17:21:52 -0800
Message-ID: <82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.com> (raw)
In-Reply-To: <CA+i5JwYCBeZ+dVR-LgV=dhyUjKNJ_TSRu3xeatZofnsRj6X4tg@mail.gmail.com>
References: <1649936435.214554.1669982358413.ref@mail.yahoo.com>
	<1649936435.214554.1669982358413@mail.yahoo.com>
	<CA+i5JwYCBeZ+dVR-LgV=dhyUjKNJ_TSRu3xeatZofnsRj6X4tg@mail.gmail.com>

On 12/13/22 13:20, Shaozhong SHI wrote:
> What is brilliant about plpython?  Any brilliant examples to look at?
> 

1) It is actually plython(3)u where the u means untrusted. This means 
you can reach outside the database and do things. That can seen as 
brilliant or dangerous.

2) You have no end of Python libraries you can work with. Again combined 
  with 1) up you whether that is brilliant or dangerous.

3) Python is more dynamic then plpgsql so you can get more adventurous 
with doing dynamic SQL.

Downside is that plpython(3)u is not tied as closely to SQL as plpgsql 
so it very often takes you many more lines of code to get something done.

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (5+ messages)

Message-ID: <82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.com>
Permalink:  ../82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.com/
Also on:    postgresql.org/message-id/82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, shishaozhong@gmail.com, ludz_lim@yahoo.com
  Subject: Re: print in plpython not appearing in logs
  In-Reply-To: <82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.com>
  References: <1649936435.214554.1669982358413.ref@mail.yahoo.com> <1649936435.214554.1669982358413@mail.yahoo.com> <CA+i5JwYCBeZ+dVR-LgV=dhyUjKNJ_TSRu3xeatZofnsRj6X4tg@mail.gmail.com> <82cb253b-aabf-e7f1-90ba-82a4ef9350c1@aklaver.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