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

Re: [SQL] Calling Functions in RULEs

2005-05-23 Thread KÖPFERL Robert
Hi, I had no try wheter this solves your problem, but have you conciddered using an array or a self-written fcn which dicards your results i.E. SELECT my_discard_but_last( q1(), q2(), q3()); or SELECT ARRAY[ q1(), q2(), q3() ]; or SELECT ROW(q1(), q2(), q3()) as my_tripel_type; Have you consi

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; pgsql-sql@postgresql.org Subject: Re: [SQL] Calling functions f

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

2005-03-24 Thread Jim Buttafuoco
Mike, I posted this RULE also on hackers CREATE or replace RULE crypto_view_delete_rule AS ON DELETE TO crypto_view DO INSTEAD ( select func_delFromCrypto( OLD.id,OLD.crypted_content); ); Jim -- Original Message --- From: "Moran.Michael" <[EMAIL PROTECTED]> To: pgsql-sql@pos

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: [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