[GRASS-user] How To Identify db.copy Error?
Markus Neteler
neteler at osgeo.org
Thu Mar 17 11:04:06 EDT 2011
On Thu, Mar 17, 2011 at 3:17 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> One of the tables I'm copying from dbf to the postgres database threw an
> error:
>
> DBMI-Postgres driver error:
> Cannot create table:
> create table hydro_pointEvent ( cat integer, ComID integer, Permanent_
> varchar(40), EventDate varchar(10), ReachCode varchar(14), ReachSMDat
> varchar(10), ReachResol integer, FeatureCom integer, Feature_Pe varchar(40),
> FeatureCla integer, Source_Ori varchar(130), Source_Dat varchar(100),
> Source_Fea varchar(40), FeatureDet varchar(254), Measure double precision,
> Offset double precision, EventType integer )
> ERROR: syntax error at or near "Offset"
> LINE 1: ...eatureDet varchar(254), Measure double precision, Offset dou...
> ^
> WARNING: Unable to create table <hydro_pointEvent>
> WARNING: Copy table failed
"Offset" is a reserved word in PostgreSQL:
"SQL Reserved Words Checker"
http://www.petefreitag.com/tools/sql_reserved_words_checker/?word=Offset
> Is there a protocol I can use within GRASS to identify the syntax error?
Within GRASS no since it comes from (and depends on) the backend.
Above link seems to be useful.
Markus
More information about the grass-user
mailing list