Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-03 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> The reason the "char" arithmetic operators are dangerous is that they are >> the only ones of those names in the STRING type category. > What would happen if "char" were just removed from the STRING type category? Wh

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-03 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> What I'm inclined to do with these is change pg_proc.h but not force > >> an initdb. Does anyone want to argue for an initdb to force it to be > >> fixed in 8.0? We've lived with the wron

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-03 Thread Mike Rylander
Not that my 2c is worth 1c, but I second this. I'd rather initdb now than get bitten by some catalog difference when I move my DB into production. :) --miker On Sat, 02 Oct 2004 14:22:50 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: [...] > > > I'd prefer if all users of 8.0 were guaranteed to hav

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd

2004-10-03 Thread Gaetano Mendola
Bruno Wolff III wrote: On Sat, Oct 02, 2004 at 15:04:51 -0500, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Sat, Oct 02, 2004 at 10:43:01 +0200, There has been such a distinction for a major release or two. "Stable" is how you mark a function that will return the same value within a single trans

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd

2004-10-02 Thread Bruno Wolff III
On Sat, Oct 02, 2004 at 15:04:51 -0500, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Sat, Oct 02, 2004 at 10:43:01 +0200, > > There has been such a distinction for a major release or two. "Stable" > is how you mark a function that will return the same value within a > single transaction. I s

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd

2004-10-02 Thread Bruno Wolff III
On Sat, Oct 02, 2004 at 10:43:01 +0200, Gaetano Mendola <[EMAIL PROTECTED]> wrote: > Tom Lane wrote: > >I wrote: > >Do you see any other mislabelings? > > I don't but I think that the concept of immutable shall be expanded. > I mean I can use safely a date_trunc immutable in a query ( I think th

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-02 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane > Sent: 02 October 2004 19:23 > To: Peter Eisentraut > Cc: Bruno Wolff III; [EMAIL PROTECTED] > Subject: Re: [HACKERS] Mislabeled timestamp functions (was > Re: [SQ

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-02 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> What I'm inclined to do with these is change pg_proc.h but not force >> an initdb. Does anyone want to argue for an initdb to force it to be >> fixed in 8.0? We've lived with the wrong labelings for some time now >> without noticin

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd

2004-10-02 Thread Gaetano Mendola
Tom Lane wrote: I wrote: Do you see any other mislabelings? I don't but I think that the concept of immutable shall be expanded. I mean I can use safely a date_trunc immutable in a query ( I think this is a sort of "immutable per statement" ) but not in a index definition ( the index mantainance is

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-02 Thread Peter Eisentraut
Tom Lane wrote: > What I'm inclined to do with these is change pg_proc.h but not force > an initdb. Does anyone want to argue for an initdb to force it to be > fixed in 8.0? We've lived with the wrong labelings for some time now > without noticing, so it doesn't seem like a serious enough bug to

Re: [HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-01 Thread Bruno Wolff III
On Fri, Oct 01, 2004 at 18:53:03 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > > What I'm inclined to do with these is change pg_proc.h but not force an > initdb. Does anyone want to argue for an initdb to force it to be fixed > in 8.0? We've lived with the wrong labelings for some time now wit

[HACKERS] Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)

2004-10-01 Thread Tom Lane
I wrote: > Looking at this, I realize that date_trunc() is mismarked: the > timestamptz variant is strongly dependent on the timezone setting > and so should be STABLE not IMMUTABLE. Ooops. On looking more closely, I think that all of these functions are mislabeled: