[postgis-users] GISGRAPHY setup issue

Ing. Ramon Resendiz rresendiz at globaltrack.com.mx
Tue Jan 3 17:07:54 PST 2012


OK i’ve found the problem here the language plpgsql i don’t know why but is
empty, so must create the function plpgsql before to load functions from the
file plpgsql.sql.

 

Here are the steps:

1.       Find the file plpgsql.so

[root at gtlabserver01 pgsql]# find / -name plpgsql.so -print

/usr/lib64/pgsql/plpgsql.so

2.       Install the handler and the language as function called plpgsql,
then execute the following command: 

(CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'change_this_path_by_the_path_found_in_the_step_1' LANGUAGE 'C'; CREATE
LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';)

3.       In my case the command look like this:

CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'/usr/lib64/pgsql/plpgsql.so' LANGUAGE 'C'; CREATE LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';

4.       After the command runs may the following message could be appear:

[root at gtlabserver01 pgsql]# psql -U postgres -h 127.0.0.1 -c "CREATE
FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'/usr/lib64/pgsql/plpgsql.so' LANGUAGE 'C'; CREATE LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';"

NOTICE:  using pg_pltemplate information instead of CREATE LANGUAGE
parameters

CREATE LANGUAGE

5.       Then try again run the script that cause the error and now will be
completed correctly, like in my case.

6.       I hope this will help to further persons in the future.

 

... again, I'm sorry. It was not my intention to abuse this forum.

 

Best regards,

RR

 

 

 

De: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] En nombre de Paragon
Corporation
Enviado el: lunes, 02 de enero de 2012 09:41 p.m.
Para: 'PostGIS Users Discussion'
Asunto: Re: [postgis-users] GISGRAPHY setup issue

 

What you have looks right, but perhaps the account you are using to install
postgis.sql doesn't have rights to language or the port it default to is
different.

 

You could try doing using:

 

psql -U USER -h 127.0.0.1 -d gisgraphy -c "CREATE LANGUAGE plpgsql;"

 

In theory you should have same issue but you might get a different message. 

 

Which version of PostgreSQL are you using?

You might also try postgresql general as I don't think this is a PostGIS
specific issue.

 

Hope that helps,

Regina

http://www.postgis.us

 


  _____  


From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ing.
Ramon Resendiz
Sent: Monday, January 02, 2012 3:38 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] GISGRAPHY setup issue

Hi all,

 

I’ve tried to install the GISGRAPHY to integrated it with OPENGTS, i’ve
successfully installed OPENGTS but when I tried to configure the POSGTIS
database to create the postgis function there is an error, that I couldn’t
found information about it, that why I’m recurring to you.

 

The issues is the following:

 

# create the database

psql -U YOURUSER  -h YOURIP -c  "CREATE DATABASE gisgraphy ENCODING =
'UTF8';" à OK

 

#create language

createlang -U YOURUSER -h YOURIP plpgsql gisgraphy à OK

 

Descripción: Descripción: cid:image001.png at 01CCC6F0.1A2B5580

 

#create postgis function

psql -U USER -h 127.0.0.1 -d gisgraphy -f
/usr/share/pgsql/contrib/postgis-1.5/postgis.sql à ERROR

 

There is some function that create without any problem until the next error
message appear:

 

psql:/usr/share/pgsql/contrib/postgis-1.5/postgis.sql:2024: ERROR:  language
"plpgsql" does not exist

HINT:  Use CREATE LANGUAGE to load the language into the database.

 

Descripción: Descripción: cid:image002.png at 01CCC6F0.1A2B5580

 

Even when i tried to import the file spatial_ref_sys.sql there is an error,
I try to figure out due the postgis.sql could not was imported correctly.

 

 

psql -U USER -h 127.0.0.1 -d gisgraphy -f
/usr/share/postgresql-YOURPOSTGRESVERSION-postgis/spatial_ref_sys.sql

 

 

Best regards,

RR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120103/12d3ad4a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 46327 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120103/12d3ad4a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 101041 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120103/12d3ad4a/attachment-0001.png>


More information about the postgis-users mailing list