This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 'pgplsh' on Cygwin
- From: marco atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 24 Oct 2013 17:19:52 +0200
- Subject: Re: 'pgplsh' on Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <DUB126-W40D94C295FABE0CA351F6EA90C0 at phx dot gbl>
Il 10/24/2013 4:17 PM, sbremal@hotmail.com ha scritto:
Hello
I am getting 'pgplsh' run under Cygwin PostgreSQL. After minor adjustments to the makefile the library compiles, however I am facing the following error when 'loading' the function definitions in the database:
$ psql -d postgres -U SYSTEM -f /usr/local/share/pgplsh/createlang_pgplsh.sql
psql:/usr/local/share/pgplsh/createlang_pgplsh.sql:3: ERROR: could not load
library "/usr/local/lib/pgplsh/pgplsh.a": Exec format error
psql:/usr/local/share/pgplsh/createlang_pgplsh.sql:7: ERROR: could not load
library "/usr/local/lib/pgplsh/pgplsh.a": Exec format error
psql:/usr/local/share/pgplsh/createlang_pgplsh.sql:11: ERROR: function
pg_catalog.plsh_handler() does not exist
$ file /usr/local/lib/pgplsh/pgplsh.a
/usr/local/lib/pgplsh/pgplsh.a: current ar archive
$ file /usr/local/lib/pgplsh/pgplsh.la
/usr/local/lib/pgplsh/pgplsh.la: libtool library file,
Could someone tide me over this issue? Thanks!
Cheers
Balazs
some info more about how you built pgplsh ?
trying to load a static lib looks wrong...
---
$ cat /usr/local/share/pgplsh/createlang_pgplsh.sql
CREATE FUNCTION pg_catalog.plsh_handler() RETURNS language_handler
AS '/usr/local/lib/pgplsh/pgplsh.a'
LANGUAGE C;
CREATE FUNCTION pg_catalog.plsh_validator(oid) RETURNS void
AS '/usr/local/lib/pgplsh/pgplsh.a'
LANGUAGE C;
CREATE LANGUAGE plsh
HANDLER pg_catalog.plsh_handler
VALIDATOR pg_catalog.plsh_validator;
--
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple