Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Dave Page
Tom Lane wrote: > Dave Page <[EMAIL PROTECTED]> writes: >> ... I doubt it's likely to be anything like as much work as the >> operator family reshuffle has been. > > [ blink... ] I would not have thought that the opfamily stuff would > affect pgAdmin at all. Would you mind clarifying what proble

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Peter Eisentraut
Merlin Moncure wrote: > I thought stored procedures did not run implicitly in transactions > like functions do. That has nothing to do with the reality in PostgreSQL. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Merlin Moncure
On 2/14/07, Martijn van Oosterhout wrote: On Wed, Feb 14, 2007 at 05:18:10PM -0500, Walter Vaughan wrote: > This may not help, but I noticed using pgAdminIII, you can create a > procedure or a function, but they seem to have the same creation interface > and use the same icon. Way back when I l

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread [EMAIL PROTECTED]
> I searched on postgreSql site and found > a topic "Stored Procedure Example". But actually, they > showed how to write a function on postgreSql database. A procedure is a function with a return type of void. ---(end of broadcast)--- TIP 4: Have y

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Tom Lane
Dave Page <[EMAIL PROTECTED]> writes: > ... I doubt it's likely to be anything like as much work as the > operator family reshuffle has been. [ blink... ] I would not have thought that the opfamily stuff would affect pgAdmin at all. Would you mind clarifying what problems it caused you?

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Alvaro Herrera
Dave Page wrote: > Peter Eisentraut wrote: > > Dave Page wrote: > >> Because PostgreSQL allows return values and IN/OUT/INOUT parameters > >> on the same routine, we use the first part of the definition only > >> when making our distinction. > >> > >> Source: section 4.27, SQL-invoked Routines in >

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Dave Page
Peter Eisentraut wrote: > Dave Page wrote: >> Because PostgreSQL allows return values and IN/OUT/INOUT parameters >> on the same routine, we use the first part of the definition only >> when making our distinction. >> >> Source: section 4.27, SQL-invoked Routines in >> SWD-02-Foundation-2003-09 >

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Peter Eisentraut
Dave Page wrote: > Because PostgreSQL allows return values and IN/OUT/INOUT parameters > on the same routine, we use the first part of the definition only > when making our distinction. > > Source: section 4.27, SQL-invoked Routines in > SWD-02-Foundation-2003-09 That same clause also contains var

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Dave Page
Peter Eisentraut wrote: > Dave Page wrote: >> pgAdmin defines a stored procedure as: >> >> - A function on EnterpriseDB 8.0 or above, written in edbspl. > > Why does EnterpriseDB determine what is a stored procedure in > PostgreSQL? Shouldn't that be limited to their own version of pgAdmin? The

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Peter Eisentraut
Dave Page wrote: > pgAdmin defines a stored procedure as: > > - A function on EnterpriseDB 8.0 or above, written in edbspl. Why does EnterpriseDB determine what is a stored procedure in PostgreSQL? Shouldn't that be limited to their own version of pgAdmin? > - A function written in EnterpriseDB

Re: [GENERAL] Stored Procedure examples

2007-02-15 Thread Dave Page
Walter Vaughan wrote: > Vladimir Zelinski wrote: > >> I'm struggling to create a stored procedure. I >> searched on Internet for several hours trying to find >> a simple example, but didn't find anything. I saw >> dozens of questions how to create a procedure without >> any responses. I searched o

Re: [GENERAL] Stored Procedure examples

2007-02-14 Thread Paul Lambert
Paul Lambert wrote: Walter Vaughan wrote: This may not help, but I noticed using pgAdminIII, you can create a procedure or a function, but they seem to have the same creation interface and use the same icon. A procedure is a function that returns null. That should have said void of cour

Re: [GENERAL] Stored Procedure examples

2007-02-14 Thread Paul Lambert
Walter Vaughan wrote: This may not help, but I noticed using pgAdminIII, you can create a procedure or a function, but they seem to have the same creation interface and use the same icon. A procedure is a function that returns null. You'll note if you create a procedure under pgAdminIII,

Re: [GENERAL] Stored Procedure examples

2007-02-14 Thread Martijn van Oosterhout
On Wed, Feb 14, 2007 at 05:18:10PM -0500, Walter Vaughan wrote: > This may not help, but I noticed using pgAdminIII, you can create a > procedure or a function, but they seem to have the same creation interface > and use the same icon. Way back when I learned that procedures are merely functions

Re: [GENERAL] Stored Procedure examples

2007-02-14 Thread Walter Vaughan
Vladimir Zelinski wrote: I'm struggling to create a stored procedure. I searched on Internet for several hours trying to find a simple example, but didn't find anything. I saw dozens of questions how to create a procedure without any responses. I searched on postgreSql site and found a topic "St

[GENERAL] Stored Procedure examples

2007-02-14 Thread Vladimir Zelinski
Hello everyone, I'm a brand new person to postgreSql, but not for databases. I came from Oracle and Sybase areas. I'm struggling to create a stored procedure. I searched on Internet for several hours trying to find a simple example, but didn't find anything. I saw dozens of questions how to creat