<p dir="ltr">Found the answer.</p>
<p dir="ltr"><a href="http://postgis.net/docs/RT_FAQ.html#qa_raster_fails_encoding_conversion">http://postgis.net/docs/RT_FAQ.html#qa_raster_fails_encoding_conversion</a></p>
<p dir="ltr">Got to love robe2 and her due diligence.</p>
<p dir="ltr">-bborie</p>
<div class="gmail_quote">On Mar 28, 2014 5:30 PM, "georgew" <<a href="mailto:gws293@hotmail.com">gws293@hotmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, I am trying to convert a raster from SAGA GIS to Postgis using<br>
raster2pgsql.The command line and its output is:<br>
C:\\Progra~1\\PostgreSQL\\9.3\\bin\\raster2pgsql.exe -F -d -<br>
I -C -M -s 2193 I:\cb09\cb09_3dem.sdat cb09_3 | psql -d NZTPU<br>
<br>
Processing 1/1: I:\cb09\cb09_3dem.sdat<br>
<br>
BEGIN<br>
NOTICE:  table "cb09_3" does not exist, skipping<br>
DROP TABLE<br>
CREATE TABLE<br>
ERROR:  could not load library "C:/Program<br>
Files/PostgreSQL/9.3/lib/rtpostgis-2.1.dll": unknown error 998<br>
LINE 1: INSERT INTO "cb09_3" ("rast","filename") VALUES ('0100000100...<br>
                                                         ^<br>
ERROR:  current transaction is aborted, commands ignored until end of<br>
transactio<br>
n block<br>
.....<br>
<br>
I then ran again but just to create the output sql and dumped the first few<br>
lines of the output as follows:<br>
<br>
>C:\\Progra~1\\PostgreSQL\\9.3\\bin\\raster2pgsql.exe -F -d -<br>
I -C -M -s 2193 I:\cb09\cb09_3dem.sdat cb09_3 > c:\cb09.sql<br>
Processing 1/1: I:\cb09\cb09_3dem.sdat<br>
<br>
C:\WINDOWS\system32>more < c:\cb09.sql<br>
BEGIN;<br>
DROP TABLE IF EXISTS "cb09_3";<br>
CREATE TABLE "cb09_3" ("rid" serial PRIMARY KEY,"rast" raster,"filename"<br>
text);<br>
INSERT INTO "cb09_3" ("rast","filename") VALUES<br>
('010000010000000000000014400000<br>
0000000014C0000000801D5F3241000000A0BC3F5341000000000000000000000000000000009108<br>
0000C112211C4A804FC3C788A5B3446B9CB3440C9BB34412AAB3447FFFB3449DB9B444D679B54413<br>
06B6446859B6441C52B6441037B6446788B64468C9B64401CCB644EDAAB644797FB64458BCB64417<br>
95B744E348B844A0C6B8447C1CB944A13AB944DE0EB944D3E0B8445E14B9445B90B9442619BA443D<br>
.....<br>
<br>
Finally executed the sql:<br>
<br>
C:\WINDOWS\system32>psql -U postgres -d NZTPU -f c:\cb09.sql<br>
BEGIN<br>
psql:c:/cb09.sql:2: NOTICE:  table "cb09_3" does not exist, skipping<br>
DROP TABLE<br>
CREATE TABLE<br>
psql:c:/cb09.sql:4: ERROR:  out of memory<br>
DETAIL:  String of 276576218 bytes is too long for encoding conversion.<br>
psql:c:/cb09.sql:5: ERROR:  current transaction is aborted, commands ignored<br>
unt<br>
il end of transaction block<br>
........<br>
I assume the DLL not found is due to the lack of memory (because the file is<br>
where it should be)<br>
Is that assumption correct?<br>
<br>
All my databases and templates are UTF8 as shown here:<br>
<br>
<<a href="http://postgis.17.x6.nabble.com/file/n5006000/postgres.png" target="_blank">http://postgis.17.x6.nabble.com/file/n5006000/postgres.png</a>><br>
<br>
So why is the encoding conversion necessary?<br>
And more importantly how do I get around this problem?<br>
I am on Windows 8.1 Pro, and the very latest versions of Postgres (9.3) and<br>
Postgis (2.1.1)<br>
Many thanks for your help<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://postgis.17.x6.nabble.com/more-memory-issues-with-raster2pgsql-tp5006000.html" target="_blank">http://postgis.17.x6.nabble.com/more-memory-issues-with-raster2pgsql-tp5006000.html</a><br>

Sent from the PostGIS - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div>