<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Hi </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am facing problems while loading lwpostgis.sql in
PostGIS. Below is a detailed explanation.<BR>psql -d test -f
/usr/share/lwpostgis.sql</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>/******************************************************************************/<BR>ERROR:
could not access file "$libdir/liblwgeom.so.1.2": No such file or
directory<BR>ERROR: current transaction is aborted, commands ignored until
end of transaction
block<BR>/******************************************************************************/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV>Hence , I tried creating a simple test.sql which has the create replace
functions for histogram. I have detailed the environmnent that we are </DIV>
<DIV>using, the statement of lwpostgis.sql we executed and the error encountered
</DIV>
<DIV> </DIV>
<DIV>Environment:<BR>============</DIV>
<DIV>Operationg System : Red Hat Linux 3.4.5-2</DIV>
<DIV>Database : PostgreSQL 8.2.6 </DIV>
<DIV>Extensions : geos-3.0.0, proj-4.6.0, postgis-1.2.1</DIV>
<DIV> </DIV>
<DIV>test.sql (three sql commands that I have taken from lwpostgis.sql to
check)<BR>========</DIV>
<DIV><BR>BEGIN;</DIV>
<DIV> </DIV>
<DIV>CREATE OR REPLACE FUNCTION
histogram2d_in(cstring)<BR> RETURNS
histogram2d<BR> AS
'$libdir/liblwgeom.so.1.2',
'lwhistogram2d_in'<BR> LANGUAGE 'C'
IMMUTABLE STRICT; -- WITH (isstrict);</DIV>
<DIV> </DIV>
<DIV>CREATE OR REPLACE FUNCTION
histogram2d_out(histogram2d)<BR>
RETURNS cstring<BR> AS
'$libdir/liblwgeom.so.1.2',
'lwhistogram2d_out'<BR> LANGUAGE 'C'
IMMUTABLE STRICT; -- WITH (isstrict);</DIV>
<DIV> </DIV>
<DIV>CREATE TYPE histogram2d (<BR>
alignment = double,<BR> internallength
= variable,<BR> input =
histogram2d_in,<BR> output =
histogram2d_out,<BR> storage =
main<BR>);</DIV>
<DIV> </DIV>
<DIV>COMMIT;</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>ERROR Encountered<BR>================</DIV>
<DIV> </DIV>
<DIV>BEGIN<BR>psql:test.sql:6: NOTICE: type "histogram2d" is not yet
defined<BR>DETAIL: Creating a shell type definition.<BR>psql:test.sql:6:
ERROR: could not access file "$libdir/liblwgeom.so.1.2": No such file or
directory<BR>psql:test.sql:11: ERROR: current transaction is aborted,
commands ignored until end of transaction block<BR>psql:test.sql:19:
ERROR: current transaction is aborted, commands ignored until end of
transaction block<BR>ROLLBACK</DIV>
<DIV> </DIV>
<DIV>Varions Options we tried:<BR>==================<BR>a) Changed the
permissions $libdir i.e. /usr/lib/pgsl to 777<BR>b) Hardcoded the path
/usr/lib/pgsql in this test.sql<BR>c) We also tried hardcoding the path
/usr/lib/pgsql instead of $libdir in lwpostgis.sql when we tried loading
functions and types in lwpostgis.sql</DIV>
<DIV> </DIV>
<DIV><BR>Can somebody please guide us or give directions what can be done.
</DIV>
<DIV> </DIV>
<DIV>Regards<BR>Ahmad</FONT></DIV><p class=MsoNormal><strong><span style='font-size:24.0pt;font-family:Webdings;
color:green'>P</span></strong><strong><span style='font-size:10.0pt;font-family:
"Palatino Linotype","serif";color:green'> Please do not print this email unless it is absolutely necessary. Spread environmental awareness.</span></strong><span style='font-family:"Arial","sans-serif"'><o:p></o:p></span></p>
<p> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. </p>
<p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. </p>
<p>
www.wipro.com
</p>
</BODY></HTML>