Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 415919FB1DF for ; Mon, 16 Oct 2006 14:27:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 90250-07 for ; Mon, 16 Oct 2006 17:26:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from hub.org (hub.org [200.46.204.220]) by postgresql.org (Postfix) with ESMTP id E0B0A9FA6B3 for ; Mon, 16 Oct 2006 14:26:53 -0300 (ADT) Received: from localhost (unknown [200.46.204.128]) by hub.org (Postfix) with ESMTP id C83BE3A4652 for ; Mon, 16 Oct 2006 14:26:49 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 88478-08; Mon, 16 Oct 2006 17:25:31 +0000 (UTC) Received: from ganymede.hub.org (blk-137-86-60.eastlink.ca [24.137.86.60]) by hub.org (Postfix) with ESMTP id BB4263A464B; Mon, 16 Oct 2006 14:25:29 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id C033F36F2B; Mon, 16 Oct 2006 14:25:31 -0300 (ADT) Date: Mon, 16 Oct 2006 14:25:31 -0300 From: "Marc G. Fournier" To: Tom Lane cc: pgsql-sql@postgresql.org Subject: Re: get_next_billing_date() ... Message-ID: <48005C28206BC8E3F8F77C61@ganymede.hub.org> In-Reply-To: <19874.1161006836@sss.pgh.pa.us> References: <19874.1161006836@sss.pgh.pa.us> X-Mailer: Mulberry/4.0.6 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========EF2A47D23C4A16C03917==========" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/181 X-Sequence-Number: 26570 --==========EF2A47D23C4A16C03917========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Monday, October 16, 2006 09:53:56 -0400 Tom Lane = wrote: > "Marc G. Fournier" 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=20 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 --==========EF2A47D23C4A16C03917========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFM8CL4QvfyHIvDvMRAn+MAKCiPBBLAXpuRfVriPyAO3sFqEEoTgCgrDay K90i7mdPl+J99gHlpBot24Y= =3kBM -----END PGP SIGNATURE----- --==========EF2A47D23C4A16C03917==========--