Re: [SQL] Calling functions from within pl/pgsql

2007-12-04 Thread Pavel Stehule
Hello a := exprx is internally translated : get result of SELECT exprx and store it to a so you can write select sin(10); then you can a := sin(10) but you can too use subselect like: SELECT (SELECT v FROM foo LIMIT 1) ~ you can write a := (SELECT v FROM foo LIMIT 1); that is equal to S

Re: [SQL] Calling functions from within pl/pgsql

2007-12-04 Thread Achilleas Mantzios
Στις Tuesday 04 December 2007 14:59:43 ο/η Pavel Stehule έγραψε: > On 04/12/2007, Achilleas Mantzios <[EMAIL PROTECTED]> wrote: > > I noticed that in pl/pgsql simply > > result := funcname(func,args,...); > > just works. > > Should i rely on it or take it as a coincidence? :) > > You found assignme

Re: [SQL] Calling functions from within pl/pgsql

2007-12-04 Thread Pavel Stehule
On 04/12/2007, Achilleas Mantzios <[EMAIL PROTECTED]> wrote: > I noticed that in pl/pgsql simply > result := funcname(func,args,...); > just works. > Should i rely on it or take it as a coincidence? :) You found assignment :). Sure, you can use it. http://www.postgresql.org/docs/8.2/interactive/pl

[SQL] Calling functions from within pl/pgsql

2007-12-04 Thread Achilleas Mantzios
I noticed that in pl/pgsql simply result := funcname(func,args,...); just works. Should i rely on it or take it as a coincidence? :) -- Achilleas Mantzios ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Calling Functions in RULEs

2005-05-23 Thread KÖPFERL Robert
considdered CASTs? These are just ideas |-Original Message- |From: Jan B. [mailto:[EMAIL PROTECTED] |Sent: Sonntag, 22. Mai 2005 11:24 |To: [email protected] |Subject: [SQL] Calling Functions in RULEs | | |Hello, | |I would like to call multiple PL/pgSQL procedures (i.e. functions

[SQL] Calling Functions in RULEs

2005-05-22 Thread Jan B.
Hello, I would like to call multiple PL/pgSQL procedures (i.e. functions returning void) from INSERT, UPDATE and DELETE RULEs. Using "SELECT some_procedure();" is a possible way to do that, but it causes a dummy result table to be delivered to the application invoking the INSERT/UPDATE/DELET

Re: [SQL] Calling functions from Delete View (+ contrib/pgcrypto)

2005-03-25 Thread Michael Fuhr
On Fri, Mar 25, 2005 at 07:53:46AM -0800, Moran.Michael wrote: > Anyway, by far, this Posgres SQL forum is the best forum I've encountered > for finding answers to questions like mine below. Much better than the > Hackers or Admin forums it seems. Some subjects are off-topic for some mailing list

Re: [SQL] Calling functions from Delete View (+ contrib/pgcrypto)

2005-03-25 Thread Moran.Michael
ding answers to questions like mine below. Much better than the Hackers or Admin forums it seems. Thanks all! -Michael Moran _ From: Jim Buttafuoco [mailto:[EMAIL PROTECTED] Sent: Thu 3/24/2005 7:44 PM To: Moran.Michael; [email protected] Subject: Re: [SQL] Calling functions f

Re: [SQL] Calling functions from Delete View (+ contrib/pgcrypto) = madness ??

2005-03-24 Thread Jim Buttafuoco
t; To: [email protected] Sent: Thu, 24 Mar 2005 17:30:33 -0800 Subject: [SQL] Calling functions from Delete View (+ contrib/pgcrypto) = madness ?? > Hello there, > > I have a View with a Delete rule and I would like the Delete rule to call a > function (and pass-in a few of the t

[SQL] Calling functions from Delete View (+ contrib/pgcrypto) = madness ??

2005-03-24 Thread Moran.Michael
Hello there, I have a View with a Delete rule and I would like the Delete rule to call a function (and pass-in a few of the the underlying View's/Table's column values). How do you do this? When I do it, I keep getting the following error: ERROR: function expression in FROM may not refer to ot

Re: [SQL] Calling Functions

2001-10-01 Thread Josh Berkus
Oleg, > Hi, > this is a very silly question, but how do I run PL/pgSQL function > from SQL? > I created a function test(varchar, varchar) and I am trying to invoke > it with > parameters 'hello', 'world' using an SQL statement. I tried selects > and executes > - nothing works. > Please help, SEL

Re: Fwd: [SQL] Calling functions inside a function: behavior

2001-04-02 Thread edipoelder
Em 02 Apr 2001, Josh Berkus escreveu: >BEGIN WORK; >COMMIT WORK; In time... I think that could be great if postgresql implement a commit inside functions. Abracos, Edipo Elder [[EMAIL PROTECTED]] _ Oi! Você quer u

Fwd: [SQL] Calling functions inside a function: behavior

2001-04-02 Thread Josh Berkus
Edipo, > FUNCTION (...) AS '(...)BEGIN > PERFORM FUNCTION1(); > PERFORM FUNCTION2(); > (...) > END;' LANGUAGE 'PLPGSQL'; I'm not sure about that syntax (PERFORM). I ususally set my functions equal to a value ('remote_result := Function1(paramater)'). This has the added advantage of lett

Re: [SQL] Calling functions inside a function: behavior

2001-04-02 Thread Roberto Mello
On Mon, Apr 02, 2001 at 08:50:32AM -0300, Edipo Elder Fernandes de Melo wrote: > > and, for my surprise, it take minutes to run. I read the documentation > and I didn't found any coment abou this behavior. Can anyone explain this? Cool, one more Brazilian in the list :) I

[SQL] Calling functions inside a function: behavior

2001-04-02 Thread Edipo Elder Fernandes de Melo
Hi all, I wrote a function that call another functions, like this: FUNCTION (...) AS '(...)BEGIN PERFORM FUNCTION1(); PERFORM FUNCTION2(); (...) END;' LANGUAGE 'PLPGSQL'; The problem is that takes a long time to execute (I stoped after three days executing). To see