Question about inscrutable cast syntax

From: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Question about inscrutable cast syntax
Date: 2008-12-19 15:59:43
Message-ID: 494BC4EF.6030105@genome.chop.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Two versions of an application differ in the way a particular column is
defined.

OLD:

lastupdated timestamp without time zone DEFAULT
('now'::text)::timestamp(6) with time zone NOT NULL

NEW:

lastupdated timestamp without time zone DEFAULT now() NOT NULL

I believe these are both the result of an automatic mysql-to-postgresql
conversion process rather than hand-coded.

For my personal edification, I'd like to understand what's going on with
that first one! Note that the column type is timestamp without time
zone, so I'm also curious about the 'with time zone' modifier in the
first example.

Thanks,
Kevin Murphy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2008-12-19 16:15:56 Re: [PGSQL 8.3.5] How to handle FKs with partitioning?
Previous Message Zoltan Boszormenyi 2008-12-19 14:21:35 Re: REVOKE CONNECT doesn't work in 8.3.5