Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 12:29 AM
mboes@tweag.net
Guest
 
Posts: n/a
Default timestamp precision with or without timezones

Hi there,

Is there a way of specifying the precision of a timestamp *with
timezone* field? It works fine for timestamps *without* timezones, but
gives me a syntax error if I try with timestamptz:

tweag=> create table tbl1 (t timestamp(0));
CREATE TABLE
tweag=> \d tbl1
Table "public.tbl1"
Column | Type | Modifiers
--------+--------------------------------+-----------
t | timestamp(3) without time zone |

tweag=> create table tbl1 (t timestamptz(0));
ERROR: syntax error at or near "(" at character 33
tweag=> create table tbl1 (t timestamp(0) without timezone);
ERROR: syntax error at or near "timezone" at character 43

TIA,

Mathieu Boespflug

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

  #2  
Old November 23rd, 2005, 12:29 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: timestamp precision with or without timezones

mboes@tweag.net writes:[color=blue]
> Is there a way of specifying the precision of a timestamp *with
> timezone* field? It works fine for timestamps *without* timezone[/color]

It's
timestamp(n) with time zone
timestamp(n) without time zone
and not any other variants that might seem natural.

Don't blame us, that's what the SQL standard says ;-)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles