pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: arnaulist@andromeiberica.com
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: index over timestamp not being used
Date: Tue, 24 Jul 2007 15:43:15 -0400
Message-ID: <15140.1185306195@sss.pgh.pa.us> (raw)
In-Reply-To: <46A6537B.6010604@andromeiberica.com>
References: <46A64475.3040201@andromeiberica.com>
	<14907.1185305095@sss.pgh.pa.us>
	<46A6537B.6010604@andromeiberica.com>

Arnau <arnaulist@andromeiberica.com> writes:
>> Alternatively, do you really need to_timestamp at all?  The standard
>> timestamp input routine won't have any problem with that format:
>> t.timestamp_in >= '20070101'

> This is always I think I'm worried, what happens if one day the internal 
> format in which the DB stores the date/timestamps changes. I mean, if 
> instead of being stored as YYYYMMDD is stored as DDMMYYYY, should we 
> have to change all the queries?

You are confusing internal storage format with the external
representation.

> I thought the 
> to_char/to_date/to_timestamp functions were intented for this purposes

No, they're intended for dealing with wacky formats that the regular
input/output routines can't understand or produce.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <15140.1185306195@sss.pgh.pa.us>
Permalink:  ../15140.1185306195@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15140.1185306195@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, arnaulist@andromeiberica.com
  Subject: Re: index over timestamp not being used
  In-Reply-To: <15140.1185306195@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