From: Marc G. Fournier <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: get_next_billing_date() ...
Date: Mon, 16 Oct 2006 14:25:31 -0300
Message-ID: <48005C28206BC8E3F8F77C61@ganymede.hub.org> (raw)
In-Reply-To: <19874.1161006836@sss.pgh.pa.us>
References: <FCAC5B77DDF2D6F4D01F8527@ganymede.hub.org>
<AC408535B18EB067761CF6A3@ganymede.hub.org>
<19874.1161006836@sss.pgh.pa.us>
--On Monday, October 16, 2006 09:53:56 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Marc G. Fournier" <scrappy@hub.org> writes:
>> In fact, more info to work with ... it likes the date, just not when I use it
>> as part of a SELECT query of a table ...
>
> I suspect it's not so much the "table" part as some specific value of
> the date coming from the table --- can you find out what value it's
> failing on?
That's the thing ... the one example I sent only returns one record, and if I
plug in the timestamp value that it returns directly, it doesn't fail ...
Got it, and the error message in no way indicates ...
I created the function 'timestamp with time zone' ... the field in the table is
'timestamp without time zone' ... fix the function , and voila:
company_id | get_next_billing_date
------------+----------------------------
708 | 2006-12-13 14:09:11.442111
679 | 2006-10-25 11:04:00.117714
771 | 2006-11-03 15:09:19.491958
688 | 2006-11-11 18:18:42.23105
701 | 2006-11-28 11:45:36.182217
656 | 2006-11-05 20:46:01.335434
703 | 2006-11-28 19:35:25.081577
704 | 2006-12-05 21:53:57.122358
756 | 2007-01-02 14:18:22.11068
I knew it had to be *somethign* stupid :(
Thx ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy@hub.org MSN . scrappy@hub.org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
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: scrappy@hub.org, tgl@sss.pgh.pa.us
Subject: Re: get_next_billing_date() ...
In-Reply-To: <48005C28206BC8E3F8F77C61@ganymede.hub.org>
* 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