View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001758 | SymmetricDS | Bug | public | 2014-06-11 14:32 | 2014-07-12 21:31 |
Reporter | tregnago | Assigned To | chenson | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.5.22 | ||||
Target Version | 3.6.2 | Fixed in Version | 3.6.2 | ||
Summary | 0001758: PostgreSQL default value for 'uuid' field type | ||||
Description | SqlException happens with initial.load.create.first=true with PostgreSQL, using uuid data types. | ||||
Steps To Reproduce | Original table has an uuid column type with a default value of 'deadbeef-badd-badd-badd-2be2def4bedd'::uuid. CREATE TABLE sys_ruoli ( idruolo uuid NOT NULL DEFAULT uuid_generate_v4(), ruolo character varying(50) NOT NULL, descrizione character varying(100) NOT NULL, immagine bytea, incarico boolean NOT NULL, inserimento timestamp(3) without time zone NOT NULL DEFAULT now(), idrecordwriter uuid NOT NULL DEFAULT 'deadbeef-badd-badd-badd-2be2def4bedd'::uuid, CONSTRAINT pk_sys_ruoli PRIMARY KEY (idruolo) ) | ||||
Additional Information | Server generates this: <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database"> <database name="public"> <table name="sys_ruoli"> <column name="idruolo" primaryKey="true" required="true" type="OTHER" size="2147483647" default="uuid_generate_v4()"> <platform-column name="postgres" type="uuid" size="2147483647"/> </column> <column name="ruolo" required="true" type="VARCHAR" size="50"> <platform-column name="postgres" type="varchar" size="50"/> </column> <column name="descrizione" required="true" type="VARCHAR" size="100"> <platform-column name="postgres" type="varchar" size="100"/> </column> <column name="immagine" type="LONGVARBINARY" size="2147483647"> <platform-column name="postgres" type="bytea" size="2147483647"/> </column> <column name="incarico" required="true" type="BIT" size="1"> <platform-column name="postgres" type="bool" size="1"/> </column> <column name="inserimento" required="true" type="TIMESTAMP" size="26,3" default="now()"> <platform-column name="postgres" type="timestamp" size="26" decimalDigits="3"/> </column> <column name="idrecordwriter" required="true" type="OTHER" size="2147483647" default="'deadbeef-badd-badd-badd-2be2def4bedd'::uuid"> <platform-column name="postgres" type="uuid" size="2147483647"/> </column> </table> </database> And the client try to create the table with the following invalid syntax: CREATE TABLE "sys_ruoli" ( "idruolo" uuid DEFAULT 'uuid_generate_v4()' NOT NULL, "ruolo" varchar(50) NOT NULL, "descrizione" varchar(100) NOT NULL, "immagine" bytea, "incarico" bool NOT NULL, "inserimento" timestamp DEFAULT 'now()' NOT NULL, "idrecordwriter" uuid DEFAULT '\'deadbeef-badd-badd-badd-2be2def4bedd\'::uuid' NOT NULL, PRIMARY KEY ("idruolo") ); which result in a syntax error. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-11 14:32 | tregnago | New Issue | |
2014-07-08 00:30 | chenson | Assigned To | => chenson |
2014-07-08 00:30 | chenson | Status | new => assigned |
2014-07-08 00:30 | chenson | Target Version | => 3.6.2 |
2014-07-08 12:11 | chenson | Status | assigned => resolved |
2014-07-08 12:11 | chenson | Fixed in Version | => 3.6.2 |
2014-07-08 12:11 | chenson | Resolution | open => fixed |
2014-07-08 13:00 | chenson | Changeset attached | => SymmetricDS trunk r8444 |
2014-07-12 21:31 | chenson | Status | resolved => closed |
2015-07-31 01:49 | chenson | Changeset attached | => SymmetricDS master 2edf269f |