Re: PL/Python

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/Python
Date: 2011-10-03 08:14:57
Message-ID: 4E896F01.1040702@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Maybe I'm misunderstanding something, but isn't such a sql file an
> extension or is 95% of the way there? Pyrseas is already distributed
> via PGXN, but like some other PGXN "extensions" (dbi-link?), it doesn't
> actually create functions in the database. Its two utilities run
> entirely as external programs. If the Pyrseas functions were added via
> an .sql file to a database, EXTENSION or not, they would be available
> for use by non-Pyrseas programs, e.g., pgAdmin could call diff_map() to
> compare database objects, Perl scripts or even a plain psql script could
> call to_yaml(). And these would not depend on psycopg2, which currently
> *is* a Pyrseas dependency (it would still be necessary for access to the
> command line utilities).
>
> Joe
I don't know if there is an official definition, but an extension is
generally a compiled program that is accessed by the SQL. It must be
compiled with the postgresql headers and have the magic number defined.
The compiled file must then be put into the lib directory with the other
postgresql extensions.

A user defined function does extend postgresql, but it doesn't have any
of the complications.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2011-10-03 08:42:08 Re: [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe
Previous Message Dave Page 2011-10-03 08:11:55 Re: [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe