Re: [SQL] Problem wil TIMEZONE vs TIME ZONE

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: [SQL] Problem wil TIMEZONE vs TIME ZONE
Дата
Msg-id 1ba442c9-98e2-c727-6933-8958617a7bdf@aklaver.com
обсуждение исходный текст
Ответ на [SQL] Problem wil TIMEZONE vs TIME ZONE  (Mike Wes <mikeewes@gmail.com>)
Список pgsql-sql
On 02/08/2017 03:20 AM, Mike Wes wrote:
> Good day,
>
> Can anybody clarify the following behaviour of pgsql? A Windows user in
> our project is not able to execute a create table command caused by the
> timestamp field log_created using 'TIME ZONE' (giant_log2), but must
> explict use 'TIMEZONE' (giant_log3). This is an issue while we use
> liquibase in our project. Any ideas why this is happening?

First some information is needed:

1) What version of Postgres is this being run against?

2) Where is the Postgres server located and how was it installed?

3) What is the error message from the failing CREATE TABLE statement?

4) How did the definition for giant_log2 become the definition for 
giant_log3 as they look like they came from different processes?


>
>
> DROP TABLE IF EXISTS "public"."giant_log2";
> CREATE TABLE "public"."giant_log2" (
> "id" int8 NOT NULL,
> "version" int8,
> "uid" varchar(40) COLLATE "default",
> "consumer_id" varchar(20) COLLATE "default",
> "customer_id" varchar(20) COLLATE "default",
> "provider_id" varchar(15) COLLATE "default",
> "company_id" varchar(60) COLLATE "default",
> "country_code" varchar(2) COLLATE "default",
> "type_of_operation" varchar(40) COLLATE "default",
> "log_created" timestamp WITH TIME ZONE,
> "adapter_component" varchar(20) COLLATE "default",
> "order_status" varchar(20) COLLATE "default",
> "reference_nr" varchar(100) COLLATE "default",
> "xml_data" text COLLATE "default"
> )
> WITH (OIDS=FALSE);
> ALTER TABLE "public"."giant_log2" OWNER TO "giant";
>
> DROP TABLE IF EXISTS "public"."giant_log3";
> CREATE TABLE public.giant_log3 (id BIGINT NOT NULL,
>      version BIGINT,
>      uid VARCHAR(40),
>      consumer_id VARCHAR(20),
>      customer_id VARCHAR(20),
>      provider_id VARCHAR(15),
>      company_id VARCHAR(60),
>      country_code VARCHAR(2),
>      type_of_operation VARCHAR(40),
>      log_created TIMESTAMP WITH TIMEZONE,
>      adapter_component VARCHAR(20),
>      order_status VARCHAR(20),
>      reference_nr VARCHAR(100),
>      xml_data TEXT,
>      CONSTRAINT common_giant_log_pkey PRIMARY KEY (id))
> WITH (OIDS=FALSE);
> ALTER TABLE "public"."giant_log3" OWNER TO "giant";
>
> Kind regards,
>
> Mike
>
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com



В списке pgsql-sql по дате отправления:

Предыдущее
От: Mike Wes
Дата:
Сообщение: [SQL] Problem wil TIMEZONE vs TIME ZONE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Problem wil TIMEZONE vs TIME ZONE