Re: Problem wil TIMEZONE vs TIME ZONE

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Mike Wes <mikeewes(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem wil TIMEZONE vs TIME ZONE
Date: 2017-02-08 14:32:39
Message-ID: 1ba442c9-98e2-c727-6933-8958617a7bdf@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2017-02-08 15:52:38 Re: Problem wil TIMEZONE vs TIME ZONE
Previous Message Mike Wes 2017-02-08 11:20:35 Problem wil TIMEZONE vs TIME ZONE