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.
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general