From raul@zerosoft.ro Mon Jan 24 16:47:51 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2825F3A52B9 for ; Mon, 24 Jan 2005 16:47:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60269-08 for ; Mon, 24 Jan 2005 16:47:41 +0000 (GMT) Received: from mail.zerosoft.ro (main.zerosoft.ro [193.226.89.14]) by svr1.postgresql.org (Postfix) with ESMTP id 581AF3A5574 for ; Mon, 24 Jan 2005 16:47:36 +0000 (GMT) Received: from 192.168.16.10 by mail.zerosoft.ro ([192.168.16.1] running VPOP3) with SMTP for ; Mon, 24 Jan 2005 18:47:33 +0200 Message-ID: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> Reply-To: "Raul Secan" From: "Raul Secan" To: Subject: to_char replacement Date: Mon, 24 Jan 2005 18:47:33 +0200 Organization: ZEROSOFT MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0011_01C50245.2A205C50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Server: VPOP3 V1.4.5 - Registered to: ZeroSoft X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.078 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_60_70, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200501/2 X-Sequence-Number: 2972 This is a multi-part message in MIME format. ------=_NextPart_000_0011_01C50245.2A205C50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, since to_char() function will no longer be available from = PostgreSQL 8.1 ... I might need to change that from my scripts. For example I had something like that, which you can see returns the day = in the format I need: SELECT TO_CHAR(some_date, 'DD-MM-YYYY') FROM some_table; Is there anyway to do that without TO_CHAR? ------=_NextPart_000_0011_01C50245.2A205C50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, since = to_char() function=20 will no longer be available from PostgreSQL 8.1 ... I might need to = change=20 that from my scripts.
 
For example I had = something like=20 that, which you can see returns the day in the format I = need:
 
SELECT = TO_CHAR(some_date,=20 'DD-MM-YYYY') FROM some_table;
 
Is there anyway to do = that without=20 TO_CHAR?
------=_NextPart_000_0011_01C50245.2A205C50-- From chriskl@familyhealth.com.au Mon Jan 24 17:18:20 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4367D3A5572 for ; Mon, 24 Jan 2005 17:18:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67940-05 for ; Mon, 24 Jan 2005 17:18:10 +0000 (GMT) Received: from server.cityscape3d.com (unknown [217.206.144.18]) by svr1.postgresql.org (Postfix) with ESMTP id 199763A5534 for ; Mon, 24 Jan 2005 17:18:08 +0000 (GMT) Received: from [192.168.1.117] ([192.168.1.117]) by server.cityscape3d.com (8.12.11/8.11.6) with ESMTP id j0OGvPS1077010; Mon, 24 Jan 2005 16:57:27 GMT (envelope-from chriskl@familyhealth.com.au) Received: from 127.0.0.1 (AVG SMTP 7.0.302 [265.7.2]); Mon, 24 Jan 2005 17:17:15 +0000 Message-ID: <41F52D9B.7070209@familyhealth.com.au> Date: Mon, 24 Jan 2005 17:17:15 +0000 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Raul Secan Cc: pgsql-php@postgresql.org Subject: Re: to_char replacement References: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> In-Reply-To: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/3 X-Sequence-Number: 2973 to_char() will still be around for dates, just not for intervals. You have nothing to worry about. Chris Raul Secan wrote: > > Hello, since to_char() function will no longer be available from > PostgreSQL 8.1 ... I might need to change that from my scripts. > > For example I had something like that, which you can see returns the day > in the format I need: > > SELECT TO_CHAR(some_date, 'DD-MM-YYYY') FROM some_table; > > Is there anyway to do that without TO_CHAR? From mike@fuhr.org Mon Jan 24 17:44:44 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D98A33A552C for ; Mon, 24 Jan 2005 17:44:44 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72707-10 for ; Mon, 24 Jan 2005 17:44:40 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 5BBB23A557D for ; Mon, 24 Jan 2005 17:44:38 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0OHiZEt012432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 Jan 2005 10:44:38 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0OHiZ4k086430; Mon, 24 Jan 2005 10:44:35 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0OHiZck086429; Mon, 24 Jan 2005 10:44:35 -0700 (MST) (envelope-from mfuhr) Date: Mon, 24 Jan 2005 10:44:35 -0700 From: Michael Fuhr To: Raul Secan Cc: pgsql-php@postgresql.org Subject: Re: to_char replacement Message-ID: <20050124174435.GC86325@winnie.fuhr.org> References: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/4 X-Sequence-Number: 2974 On Mon, Jan 24, 2005 at 06:47:33PM +0200, Raul Secan wrote: > Hello, since to_char() function will no longer be available from > PostgreSQL 8.1 ... I might need to change that from my scripts. Eh? Where did you get the idea that to_char() was going away? The documentation says that to_char(interval, text) is deprecated and will be removed, but it says nothing about removing the function altogether. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ From fbax@sympatico.ca Tue Feb 1 13:28:01 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1038C8B9C44 for ; Tue, 1 Feb 2005 13:28:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73224-09 for ; Tue, 1 Feb 2005 13:27:53 +0000 (GMT) Received: from tomts36-srv.bellnexxia.net (tomts36-srv.bellnexxia.net [209.226.175.93]) by svr1.postgresql.org (Postfix) with ESMTP id 04BB78B9B27 for ; Tue, 1 Feb 2005 13:27:55 +0000 (GMT) Received: from acer.sympatico.ca ([65.95.162.23]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050201132755.HOHM1694.tomts36-srv.bellnexxia.net@acer.sympatico.ca> for ; Tue, 1 Feb 2005 08:27:55 -0500 Message-Id: <5.2.1.1.0.20050201081957.00a06d80@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Tue, 01 Feb 2005 08:24:50 -0500 To: pgsql-php@postgresql.org From: Frank Bax Subject: Re: to_char replacement In-Reply-To: <20050124174435.GC86325@winnie.fuhr.org> References: <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> <001401c50234$66a0b410$0a10a8c0@zerosoft.ro> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.036 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/3 X-Sequence-Number: 2977 At 12:44 PM 1/24/05, Michael Fuhr wrote: >On Mon, Jan 24, 2005 at 06:47:33PM +0200, Raul Secan wrote: > > > Hello, since to_char() function will no longer be available from > > PostgreSQL 8.1 ... I might need to change that from my scripts. > >Eh? Where did you get the idea that to_char() was going away? The >documentation says that to_char(interval, text) is deprecated and >will be removed, but it says nothing about removing the function >altogether. Raul is not the only one who misread that sentence. I thought the same thing when I read it last week. Reading too quickly, I guess. After spending several minutes searching for a replacement function, I went back a reread it, understanding it the second time. Perhaps if to_char(interval, text) were marked with (*) in table and then (*) note at bottom, it would be clearer that this sentence does not apply to all arguments. From pgman@candle.pha.pa.us Wed Feb 2 18:15:53 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 682098B9E1A for ; Wed, 2 Feb 2005 18:15:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30641-05 for ; Wed, 2 Feb 2005 18:15:50 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 2D5528B9E03 for ; Wed, 2 Feb 2005 18:15:47 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j12IFcI01979; Wed, 2 Feb 2005 13:15:38 -0500 (EST) From: Bruce Momjian Message-Id: <200502021815.j12IFcI01979@candle.pha.pa.us> Subject: Re: to_char replacement In-Reply-To: <5.2.1.1.0.20050201081957.00a06d80@pop6.sympatico.ca> To: Frank Bax Date: Wed, 2 Feb 2005 13:15:38 -0500 (EST) Cc: pgsql-php@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/6 X-Sequence-Number: 2980 Frank Bax wrote: > At 12:44 PM 1/24/05, Michael Fuhr wrote: > > >On Mon, Jan 24, 2005 at 06:47:33PM +0200, Raul Secan wrote: > > > > > Hello, since to_char() function will no longer be available from > > > PostgreSQL 8.1 ... I might need to change that from my scripts. > > > >Eh? Where did you get the idea that to_char() was going away? The > >documentation says that to_char(interval, text) is deprecated and > >will be removed, but it says nothing about removing the function > >altogether. > > > Raul is not the only one who misread that sentence. I thought the same > thing when I read it last week. Reading too quickly, I guess. After > spending several minutes searching for a replacement function, I went back > a reread it, understanding it the second time. Perhaps if > to_char(interval, text) were marked with (*) in table and then (*) note at > bottom, it would be clearer that this sentence does not apply to all arguments. Agreed. I think we were a little too concise in that statement. Here is the updated wording: The 8.1 release will remove the to_char() function for intervals. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073