[CLUE-Tech] PostgreSQL: psql dry heaves (no usable error message)

Jed S. Baer thag at frii.com
Fri Jan 18 18:45:09 MST 2002


Well, psql (or Postgres) won't run this DDL, and all it tells me is it has
a parse error at or near "" (i.e. null string). Any thoughts?

TIA

create table job (
  id			serial
    constraint contact_pk primary key,
  company_id		int4
    constraint job_company_fk
      references company (id),
  location_id		int4
    constraint job_location_fk
      references location (id),
  person_id		int4
    constraint job_person_fk not null
      references person (id),
  perm_flag		bool not null,
  tax_type		text not null
    constraint job_tax_type_chk
      check (
        tax_type in ('W2','1099','C2C')
      ),
  rate			money,
  rate_type		text
    constraint job_rate_type_chk
      check (
        rate_type in ('hourly','monthly','annual')
      ),
  accepted_flag		bool not null,
  start_date		date,
  end_date		date,
  notes			text,
  constraint job_tax_type_chk
    check (
      ( perm_flag and (tax_type = 'W2')
      ) OR
      ( (NOT perm_flag)
        AND (tax_type in ('1099','C2C')
      )
)
-- 
"Those who expect to reap the blessings of freedom must, like men,
 undergo the fatigue of supporting it."
 - Thomas Paine



More information about the clue-tech mailing list