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] AIX and V8 beta 3

2004-10-02 Thread Bruce Momjian
Chris Browne wrote: > [EMAIL PROTECTED] (Darcy Buskermolen) writes: > > On September 30, 2004 05:55 pm, Bruce Momjian wrote: > > > > To me it looks like all you need to do is add -pthreads or maybe > > -lpthreads depending on exact system to your compile line.. > > -lpthreads does the trick, indee

Re: [HACKERS] AIX and V8 beta 3

2004-10-02 Thread Chris Browne
[EMAIL PROTECTED] (Darcy Buskermolen) writes: > On September 30, 2004 05:55 pm, Bruce Momjian wrote: > > To me it looks like all you need to do is add -pthreads or maybe > -lpthreads depending on exact system to your compile line.. -lpthreads does the trick, indeed. (-lpthread also does the job,

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: [SQL] [NOVICE] date_trunc'd

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Gavin Sherry
On Thu, 23 Sep 2004, Tom Lane wrote: > > This makes the difference between procedures and functions quite > > superficial: procedures are functions which return void and have parameter > > modes. > > If you implement it that way I think it'll be very largely a waste of > effort :-(. What you're t

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Gavin Sherry
On Thu, 23 Sep 2004, Joe Conway wrote: > Gavin Sherry wrote: > > Do you have any idea about databases returning result sets from SQL > > procedures (ie, not functions). > > > > As other's have pointed out, this is very common in the MS SQL Server > world (and I believe Sysbase also supports it). I

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] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Joe Conway
Gavin Sherry wrote: That's fairly bizarre (at least to my view of the world). Say we could have OUT parameters which were of some SETOF style type I think that would solve the same problem. That won't satify people moving over from MSSQL/Sybase, but then again, maybe the community at-large doesn't

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Gavin Sherry
On Thu, 23 Sep 2004, Josh Berkus wrote: > One of the things which differentiates SPs on other DBs from PostgreSQL > Functions is transactionality.In SQL Server and Oracle, SPs are not > automatically a transaction; instead, they contain transactions within them. > This is vitally important to

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: >> I concur with Grant Finnemore's objection as well: people expect >> procedures to be able to return resultsets, ie SETOF something, >> not only scalar values. Whether this is what SQL2003 says is not >> really the issue -- we have to look at what's out t

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Josh Berkus
Gavin, > I agree that packages give us something like classes in that we can define > related functions/procs into a single namespace. They provide other > features like package level variables and public/private functionality. I > think they major use is namespacing, however, and we can more or l

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] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Gavin Sherry
On Thu, 23 Sep 2004, Jim C. Nasby wrote: > > This may be a better approach. I've personally never been comfortable with > > the use of variables outside of SPs and packages; it seems orthagonal to the > > declaritive nature of SQL. However, this is a aesthic thing and not really > > based on pr

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-02 Thread Alvaro Herrera
On Fri, Sep 24, 2004 at 07:28:09PM +1000, Neil Conway wrote: > On Fri, 2004-09-24 at 05:52, Alvaro Herrera wrote: > > I don't think we can do that in a standard function, at least not > > without a lot of work. > > Can you elaborate on why this would be so difficult? Because you have to keep the