to_timestamp() and quarters - Mailing list pgsql-general

From Asher Hoskins
Subject to_timestamp() and quarters
Date
Msg-id 4B8CECA7.2060301@piceur.co.uk
Whole thread Raw
Responses Re: to_timestamp() and quarters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello.

I can't seem to get to_timestamp() or to_date() to work with quarters,
can anyone see what I'm doing wrong?

e.g.
    select to_date('2010-1', 'YYYY-Q');
    Gives "2010-01-01" (correct).

    select to_date('2010-3', 'YYYY-Q');
    Also gives "2010-01-01" (should be 2010-07-01);

Am I misunderstanding how this function works? EXTRACT(QUARTER FROM
date) works fine.

I'm running Postgresql 8.4.2 on a FreeBSD system.


Thanks,
Asher.

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Hung postmaster (8.3.9)
Next
From: Antonio Goméz Soto
Date:
Subject: How to grant a user read-only access to a database?