delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/10/24/10:18:05

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:subject:date:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=tB4
aiFSSgo8bo3XM35sXK9oAM0tZ+GjRJng7MFqY246Y9XlfcjrLt7G2fSrRqJy+Sv6
GUxqQSdd5XgDmnpdc39oBFQx5iNDmwjt4Mc7kkl68JT1rCzT5jSgNsQExR+LK/Qm
wq5u5YKAXzE4x/Xr7gxd3PsE+ljv/qwF6YjE5kNA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:subject:date:content-type
:content-transfer-encoding:mime-version; s=default; bh=ZrZZS0lN/
Dc5/oXE1HuDDF9B9bc=; b=adchuWJGW4050fehn/1Br6a89HPMpl7BWIGCo18mM
LXIFIyWrE2CAAvzknKs/+FNY6vLKbKNP9gVxP3EC5KxiEsqYj4trOB9O+vNMV4tF
232m5Zzq1P6gl6C+9zrNwyr74mDZ0t12C88yO/fo8YSuIMZqr/m2J0nVmnL8tRxh
aw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: dub0-omc1-s30.dub0.hotmail.com
X-TMN: [3xA7aDVQbIx1nJW4tGHLeJ+dq8SGE+/K]
Message-ID: <DUB126-W40D94C295FABE0CA351F6EA90C0@phx.gbl>
From: <sbremal AT hotmail DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: 'pgplsh' on Cygwin
Date: Thu, 24 Oct 2013 14:17:48 +0000
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r9OEI3bI003285

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019