Hi,

During copy/paste testing I've found that on 9.1 'COLLATE' should be
omitted from table constraints definitions..Look in my PostgreSQL log:

2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:
statement: SELECT relname FROM pg_namespace n LEFT JOIN pg_class c ON
n.oid=c.relnamespace AND relkind='r' WHERE nspname='"".""' AND
relname='edi_razmena'
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  duration: 7.734 ms
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  statement: BEGIN
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  duration: 2.135 ms
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:
statement: SHOW search_path
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  duration: 1.804 ms
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 ERROR:  syntax
error at or near "COLLATE" at character 1232
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 STATEMENT:  SET
search_path=""".""";-- Table: edi_razmena
        
        -- DROP TABLE edi_razmena;
        
        CREATE TABLE edi_razmena
        (
          godina character varying COLLATE pg_catalog."default" NOT NULL,
          razmena_id character varying COLLATE pg_catalog."default" NOT NULL,
          char_set character varying COLLATE pg_catalog."default" NOT NULL,
          kupac character varying COLLATE pg_catalog."default" NOT NULL,
          dobavljac character varying COLLATE pg_catalog."default" NOT NULL,
          datum date NOT NULL,
          vreme time without time zone NOT NULL,
          test character varying COLLATE pg_catalog."default" NOT NULL,
          odgovor character varying COLLATE pg_catalog."default" NOT NULL,
          ts timestamp without time zone NOT NULL DEFAULT now(),
          CONSTRAINT edi_razmena_pkey PRIMARY KEY (godina COLLATE
pg_catalog."default", razmena_id COLLATE pg_catalog."default", kupac
COLLATE pg_catalog."default")
        )
        WITH (
          OIDS=FALSE
        );
        ALTER TABLE edi_razmena OWNER TO vlada;
        GRANT ALL ON TABLE edi_razmena TO vlada;
        GRANT ALL ON TABLE edi_razmena TO public;
        
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  statement: ROLLBACK
2011-04-14 10:04:28 CEST asoft 127.0.0.1(41254) 5357 0 LOG:  duration: 1.383 ms

Best regards,
Vladimir Kokovic, DP senior, Belgrade, Serbia

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to