pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kumar <sgnerd@yahoo.com.sg>
Cc: psql <pgsql-sql@postgresql.org>
Subject: Re: Problem with timestamp - Pls help
Date: Fri, 19 Sep 2003 11:42:30 -0400
Message-ID: <20527.1063986150@sss.pgh.pa.us> (raw)
In-Reply-To: <038501c37eaf$ff68a310$7502a8c0@hdsc.com>
References: <038501c37eaf$ff68a310$7502a8c0@hdsc.com>

"Kumar" <sgnerd@yahoo.com.sg> writes:
> I wanted to update one column of my table with now() or timestamp. And I wa=
> nt that timestamp of format ------------------------
>  2003-09-19 18:39:08.13

It sounds like you simply want to limit the fractional precision of the
value.  Why don't you just declare the column as timestamp(2) ?  All
this fooling around with substrings is inefficient and doesn't have much
to do with your real intent anyhow.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <20527.1063986150@sss.pgh.pa.us>
Permalink:  ../20527.1063986150@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20527.1063986150@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sgnerd@yahoo.com.sg
  Subject: Re: Problem with timestamp - Pls help
  In-Reply-To: <20527.1063986150@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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