pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date/Time types
2+ messages / 2 participants
[nested] [flat]

* Date/Time types
@ 2002-09-20 08:54  Seb <nospam@nospam.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Seb @ 2002-09-20 08:54 UTC (permalink / raw)
  To: pgsql-sql

Hello,

I'm french, so excuse me if my english is not correct.

I'd like to create a table with a Timestamp row (named date for example) and
width a resolution as smaller as possible (1 microsecond if possible).

What is exactly the correct query for that question ?

The query I've written is :
CREATE TABLE "table" (
"id" int4 NOT NULL,
"date" timestamp [13] NOT NULL )


If this correct, I've a second question : how can I insert a value ??? I've
tried many ways but any works ! I'm lost....
I've tried to cast, to use CURRENT_TIMESTAMP with a precision, but nothing
works...


Thanks for your help

Seb





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Date/Time types
@ 2002-09-27 16:01  Josh Berkus <josh@agliodbs.com>
  parent: Seb <nospam@nospam.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2002-09-27 16:01 UTC (permalink / raw)
  To: pgsql-sql

Seb,

> I'm french, so excuse me if my english is not correct.

Whereas if you were a native English speaker, you would realize that
there is no such thing as "correct English" .... <grin>

> I'd like to create a table with a Timestamp row (named date for
> example) and
> width a resolution as smaller as possible (1 microsecond if
> possible).
> 
> What is exactly the correct query for that question ?
> 
> The query I've written is :
> CREATE TABLE "table" (
> "id" int4 NOT NULL,
> "date" timestamp [13] NOT NULL )

Sorry, the syntax above creates a table with an *array* of 13 timestamp
values. 

I don't know what the syntax you want for an extra-precision timestamp
is.   Assuming there is one at all, which there may not be ...

I'd also advise against creating tables with reserved words (such as
"date" ) as column names.  It can cause you all kinds of headaches
later on,

-Josh Berkus





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-09-27 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 08:54 Date/Time types Seb <nospam@nospam.net>
2002-09-27 16:01 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox