pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
to_char replacement
5+ messages / 5 participants
[nested] [flat]

* to_char replacement
@ 2005-01-24 16:47  Raul Secan <raul@zerosoft.ro>
  0 siblings, 3 replies; 5+ messages in thread

From: Raul Secan @ 2005-01-24 16:47 UTC (permalink / raw)
  To: 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?

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: to_char replacement
@ 2005-01-24 17:17  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Raul Secan <raul@zerosoft.ro>
  2 siblings, 0 replies; 5+ messages in thread

From: Christopher Kings-Lynne @ 2005-01-24 17:17 UTC (permalink / raw)
  To: Raul Secan <raul@zerosoft.ro>; +Cc: 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?



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: to_char replacement
@ 2005-01-24 17:44  Michael Fuhr <mike@fuhr.org>
  parent: Raul Secan <raul@zerosoft.ro>
  2 siblings, 0 replies; 5+ messages in thread

From: Michael Fuhr @ 2005-01-24 17:44 UTC (permalink / raw)
  To: Raul Secan <raul@zerosoft.ro>; +Cc: pgsql-php

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/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: to_char replacement
@ 2005-02-01 13:24  Frank Bax <fbax@sympatico.ca>
  parent: Raul Secan <raul@zerosoft.ro>
  2 siblings, 1 reply; 5+ messages in thread

From: Frank Bax @ 2005-02-01 13:24 UTC (permalink / raw)
  To: pgsql-php

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.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: to_char replacement
@ 2005-02-02 18:15  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Frank Bax <fbax@sympatico.ca>
  0 siblings, 0 replies; 5+ messages in thread

From: Bruce Momjian @ 2005-02-02 18:15 UTC (permalink / raw)
  To: Frank Bax <fbax@sympatico.ca>; +Cc: 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@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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-02-02 18:15 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24 16:47 to_char replacement Raul Secan <raul@zerosoft.ro>
2005-01-24 17:17 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-01-24 17:44 ` Michael Fuhr <mike@fuhr.org>
2005-02-01 13:24 ` Frank Bax <fbax@sympatico.ca>
2005-02-02 18:15   ` Bruce Momjian <pgman@candle.pha.pa.us>

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