From: | Bogdan Stepanenko <bscheshir(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | default value CURRENT_TIMESTAMP in TIMESTAMP is a string value 'CURRENT_TIMESTAMP' in pgsql >= 10.0 |
Date: | 2017-12-01 10:59:21 |
Message-ID: | CAM3H=w6y2JRMvAzaFf4diOA9V9daSnn8L0GtrBasgnCM_0BGMQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
related
https://github.com/yiisoft/yii2/issues/15247
https://github.com/yiisoft/yii2/issues/15254
https://github.com/yiisoft/yii2/issues/15265
<https://github.com/yiisoft/yii2/issues/15254>
1. create table with
CREATE TABLE "type" (
int_col integer NOT NULL,
int_col2 integer DEFAULT '1',
smallint_col smallint DEFAULT '1',
char_col char(100) NOT NULL,
char_col2 varchar(100) DEFAULT 'something',
char_col3 text,
float_col double precision NOT NULL,
float_col2 double precision DEFAULT '1.23',
blob_col bytea,
numeric_col decimal(5,2) DEFAULT '33.22',
time timestamp NOT NULL DEFAULT '2002-01-01 00:00:00',
bool_col boolean NOT NULL,
bool_col2 boolean DEFAULT TRUE,
ts_default TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
bit_col BIT(8) NOT NULL DEFAULT B'10000010',
bigint_col BIGINT
);
2. Get declaration of `types` from the information schema throw PDO
3. Get data about `ts_default`
Result: Default value of `ts_default` is a raw string 'CURRENT_TIMESTAMP',
not a expression `now()`
I try with this versions (official docker images like `image:
postgres:10.0`):
9.6.6 is a expression `now()`.
10.0 and 10.1 is not use string instead of expression `now()`.
From | Date | Subject | |
---|---|---|---|
Next Message | sergey.frolov | 2017-12-01 12:45:33 | BUG #14940: Duplicated records inspite of primary key and unique constraint |
Previous Message | Bogdan Stepanenko | 2017-12-01 10:09:33 | default value '1.23' in double precision column is a string value '1.23' in pgsql >=9.5 |