Re: failed insert queries to one table-postgis enabled db - Mailing list pgsql-general

From Alban Hertroys
Subject Re: failed insert queries to one table-postgis enabled db
Date
Msg-id 7B151FB9-CC44-4CEE-8EC2-88D622E176DD@solfertje.student.utwente.nl
Whole thread Raw
In response to failed insert queries to one table-postgis enabled db  (m zyzy <myzyzy@gmail.com>)
List pgsql-general
On Jan 24, 2009, at 9:13 AM, m zyzy wrote:

> I have two type of INSERT queries that keep getting errors no matter
> how
> many times I run it in pgadminIII 1.8.4 PostgresQL
> 8.3.4+PostGIS1.3.5 on
> centos5 Linux machine.

> 2. 16mb insert failed . the problem query ;
>
> INSERT INTO lutonszone (gid, area, perimeter, lot_no, unitadmin,
> zoning,
> notes, the_geom, projectid) VALUES (23071, 3.071000, -9999.000000,
> '0036\0178', 46, 'ru4', NULL,
>
'0106000020E61000000100000001030000000100000004000000C61858C7F112594099D87C5C1BDA154072A43330F2125940CC7D721420DA154049F7730AF21259

> ',NULL);
> in the Messages tab console :
>
> WARNING:  nonstandard use of escape in a string literal
> LINE 23237: ...projectid) VALUES (23071, 3.071000, -9999.000000,
> '0036\0178...
>                                                                 ^
> HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
> ERROR:  geometry requires more points
>
> ********** Error **********


Looks like the backslash is interpreted as an escape character. Switch
on 'standard_conforming_strings' and probably turn off
'escape_string_warning'.

Don't know about the other one, I'm guessing you're supplying a
polygon or some other shape that is missing a closing segment (and
thus being a polyline effectively I guess). I've never worked with
shapes in postGIS though.
It could be caused by the above issue if parts of the shape definition
contain backslashes as well.

And finally, I know there is a limit on query size somewhere... You
might be hitting that with 16MB queries.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,497af707747031347810546!



pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: very long update gin index troubles back?
Next
From: Harald Armin Massa
Date:
Subject: Installing PostgreSQL on Windows 7 Beta Build 7000 64bit - first results