Skip site navigation (1) Skip section navigation (2)

Timestamp Length or Precision Bug

From: Adam Taft <adam(at)adamtaft(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Timestamp Length or Precision Bug
Date: 2008-02-08 00:40:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-support

I've noticed this bug for quite a few versions of PgAdmin now.  I was 
hoping that a bug reporting tool would someday appear on the website.  I 
guess this is the best way to report the problem.

When creating a 'timestamp without timezone' and specifying the 'length' 
parameter, invalid SQL is generated.  The generated SQL is this:

ALTER TABLE usertags ADD COLUMN a timestamp without time zone(3);

PostgreSQL expects it to look like this:

ALTER TABLE usertags ADD COLUMN a timestamp(3) without time zone;

This bug effects create statements too.  Here is the generated SQL in 
that case:

    ts timestamp without time zone(3)

This applies to both timestamp types (with and without timezone) and I'm 
assuming possibly the 'time' type as well, though I haven't looked at this.

Additionally, the 'length' field is used in the PgAdmin UI, whereas in 
the PostgreSQL documention, the field is referred to as 'precision.' 
I'm wondering if the Precision input box in the PgAdmin UI should be 
enabled instead of the Length input box.


Adam Taft


pgadmin-support by date

Next:From: Dave PageDate: 2008-02-08 14:17:00
Subject: Re: Timestamp Length or Precision Bug
Previous:From: Laurent DupervalDate: 2008-02-07 15:30:56
Subject: Query Window: keep going after error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group