'pgplsh' on Cygwin

marco atzeri marco.atzeri@gmail.com
Thu Oct 24 15:36:00 GMT 2013


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



More information about the Cygwin mailing list