Re: to_char replacement

Lists: Postg메이저 토토 사이트SQL : Postg메이저 토토 사이트SQL 메일 링리스트 : 2005-02-01 이후 PGSQL-PHP 13:24
From: "Raul Secan" <raul(at)zerosoft(dot)ro>
To: <pgsql-php(at)postgresql(dot)org>
Subject: to_char replacement
Date: 2005-01-24 16:47:33
Message-ID: 001401c50234a0b410001401c50234$66a0b410$0a10a8c0@zerosoft.roa10a8c0@zerosoft.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

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: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Raul Secan <raul(at)zerosoft(dot)ro>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: to_char replacement
Date: 2005-01-24 17:17:15
Message-ID: 41F52D9B.7070209@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

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: Michael Fuhr <mike(at)fuhr(dot)org>
To: Raul Secan <raul(at)zerosoft(dot)ro>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: to_char replacement
Date: 2005-01-24 17:44:35
Message-ID: 20050124174435.GC86325@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg토토 사이트 추천SQL : Postg토토 사이트 추천SQL 메일 링리스트 : 2005-01-24 이후 PGSQL-PHP 17:44

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: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: to_char replacement
Date: 2005-02-01 13:24:50
Message-ID: 5.2.1.1.0.20050201081957.00a06d80@pop6.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg메이저 토토 사이트SQL : Postg메이저 토토 사이트SQL 메일 링리스트 : 2005-02-01 이후 PGSQL-PHP 13:24

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: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Frank Bax <fbax(at)sympatico(dot)ca>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: to_char replacement
Date: 2005-02-02 18:15:38
Message-ID: 200502021815.j12IFcI01979@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

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 <function>to_char()</> function
for intervals.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073