Re: [GENERAL] Why does this work?

2007-06-15 Thread Rodrigo De León
On Jun 15, 1:56 pm, [EMAIL PROTECTED] ("Ian Harding") wrote:
> I accidentally formatted a string for tsearch before trying to cast it
> to a date, and it worked!
>
>  select 'June&15&2007'::date
> date
> 
>  2007-06-15
> (1 row)
>
> Is this a happy accident, or is it OK to count on it continuing to
> work this way?
>
> Thanks,
>
> Ian

select
'June&15&2007'::date
,'June.15.2007'::date
,'June__15__2007'::date

See: http://www.postgresql.org/docs/8.2/static/x71171.html


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] Why does this work?

2007-06-15 Thread Ian Harding

I accidentally formatted a string for tsearch before trying to cast it
to a date, and it worked!

select 'June&15&2007'::date
   date

2007-06-15
(1 row)

Is this a happy accident, or is it OK to count on it continuing to
work this way?

Thanks,

Ian

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly