Issues

ZF-3972: Wrong value for "Default value" in describeTable at pgsql adapter

Description

In a column defined as :

"COLUMNNAME" character(10) NOT NULL DEFAULT 'ABCDE12345'::character varying

the value returned by describeTable method for the "DEFAULT" metadata is "'ABCDE12345'::character varying" instead "ABCDE12345" as other adapters (mysql,...)

Comments

Is it possible if you can provide the CREATE table sql and the expected var_dump output of the descriptTable method?

That would help immensely as I am not an expert in the ways of pgsql ;)

-ralph

The create table statement can be something like :

CREATE TABLE mytable ( pkfield character varying(4) NOT NULL, charfield character varying(1) NOT NULL DEFAULT 'A'::character varying, intfield bigint NOT NULL DEFAULT 1, CONSTRAINT mytable_pkey PRIMARY KEY (pkfield ) ) WITHOUT OIDS;

The expected default value : - for charfield is "A" instead "'A'::character varying" - for intfield is "1" and it is OK.

You can Test it using another DB adapter (eg mysql) with the correspondig create table:

CREATE TABLE mytable ( pkfield varchar(4) NOT NULL, charfield varchar(1) NOT NULL DEFAULT 'A' intfield bigint NOT NULL DEFAULT 1, CONSTRAINT mytable_pkey PRIMARY KEY (pkfield ) )

HTH,

blas

Corrected with SVN18645