blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:

I have a rather large schema that I'm trying to use SQL::Translator (sqlt) to create a diagram of with. When I run the sqlt command

sqlt -f PostgreSQL -t Diagram bcdc-schema.sql
I get the rather annoying error message:
Error: translate: Error with parser 'SQL::Translator::Parser::PostgreS +QL': Couldn't create table 'state': Can't create table: "" exists at +/usr/lib/perl5/site_perl/5.8.5/SQL/Translator/Parser/PostgreSQL.pm li +ne 934.
Anybody else run into this? Thoughts?

The table in question is defined as:

CREATE TABLE state ( state_id serial NOT NULL, abbr character varying(2) DEFAULT ''::character varying NOT NULL, name character varying(40) DEFAULT ''::character varying NOT NULL );

Is "state" a reserved word in SQL::Translator?


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re: Odd issue with sqlt PostgreSQL translator.
by merlyn (Sage) on Feb 01, 2007 at 17:28 UTC

      It is still decidedly broken for PostgreSQL in some pretty significant ways.


      We're not surrounded, we're in a target-rich environment!
          The last time I looked at sqlt, it was broken for PostgreSQL,

      Damn... I hate when that happesn. Thanks merlyn.


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg