'pgplsh' on Cygwin

sbremal@hotmail.com sbremal@hotmail.com
Thu Oct 24 14:22:00 GMT 2013


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

---

$ 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



More information about the Cygwin mailing list