Re: day of week
| От | Don Baccus | 
|---|---|
| Тема | Re: day of week | 
| Дата | |
| Msg-id | 3.0.1.32.20000605140346.010600a0@mail.pacifier.com обсуждение исходный текст  | 
		
| Ответ на | day of week (Karel Zak <zakkr@zf.jcu.cz>) | 
| Ответы | 
                	
            		Re: day of week
            		
            		 Re: day of week  | 
		
| Список | pgsql-hackers | 
At 10:52 PM 6/5/00 +0200, Karel Zak wrote:
>
>
>We have for same questions different answers now:
>
>(DAY OF WEEK)
>
>test=# select date_part('dow', now());
> date_part
>-----------
>         1
>(1 row)
>
>test=# select to_char(now(), 'D');
> to_char
>---------
> 2
>(1 row)
>
>
>For to_char() I use POSIX definition of 'tm' where week start on Sunday.
> 
>Is it right? (Exuse me, I see archive, but without some effect...).
>
>Or we will support both styles?
to_char() gives the same answer with Oracle, as it is supposed to
and as you intended it to.
I personally don't find it all that disconcerting that the two give
different answers.  Change the old, PG way and lots of old code
is likely to break.  Change to_char() and the desired compatibility
with Oracle breaks.
I think it boils down to needing good documentation ???
- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 
		
	В списке pgsql-hackers по дате отправления: