pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fernando Hevia <fhevia@ip-tel.com.ar>
To: 'Scott Marlowe' <scott.marlowe@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: First day of month, last day of month
Date: Thu, 24 Apr 2008 13:07:19 -0300
Message-ID: <024501c8a625$4590fdf0$8f01010a@iptel.com.ar> (raw)
In-Reply-To: <dcc563d10804240844i67e12e81l2a5f733b746ab207@mail.gmail.com>
References: <f16f7ea00804240559y6694c19fx102e57ea4455b07d@mail.gmail.com>
	<481085D1.2010807@sympatico.ca>
	<48108813.6070401@sympatico.ca>
	<481095FB.7090600@denterprises.org>
	<f16f7ea00804240743la32b08cm6ced0d9ced56948a@mail.gmail.com>
	<dcc563d10804240755w612ec586l6bf8b0f4a805d49f@mail.gmail.com>
	<023b01c8a61d$5855cea0$8f01010a@iptel.com.ar>
	<dcc563d10804240816v58322af0jaeb6d3a0b58967f2@mail.gmail.com>
	<dcc563d10804240844i67e12e81l2a5f733b746ab207@mail.gmail.com>

 

> -----Mensaje original-----
> De: Scott Marlowe [mailto:scott.marlowe@gmail.com] 
> 
> 
> Note that if you are storing your time stamp as timestamptz, 
> you can use the "at time zone 'xyz'" construct to create an 
> index, and as long as you retrieve them with the same 
> construct you'll get to use the index.
> 
> create index test_ts_month_trunc on testtable 
> (date_trunc('month',(ts at time zone 'MST'))); 
> select * from testtable 
> where date_trunc('month',(ts at time zone 'MST'))='2007-10-01
00:00:00'::timestamp;
> 

I see the point. Thanks for the elaboration.





view thread (21+ messages)  latest in thread

Message-ID: <024501c8a625$4590fdf0$8f01010a@iptel.com.ar>
Permalink:  ../024501c8a625$4590fdf0$8f01010a@iptel.com.ar/
Also on:    postgresql.org/message-id/024501c8a625$4590fdf0$8f01010a@iptel.com.ar

 · 

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: fhevia@ip-tel.com.ar, scott.marlowe@gmail.com
  Subject: Re: First day of month, last day of month
  In-Reply-To: <024501c8a625$4590fdf0$8f01010a@iptel.com.ar>

* 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