[SQL] Function declaration

2005-04-18 Thread A. Kulikov
Is there a possiblity to declare functions with optional parameters i.e. in case some parameters are not passed to the function, then some kind of default value is assigned to the function? regards, alex -- The mind is essential -- http://essentialmind.com/ ---(end of br

[SQL] User Defined Functions Errors

2005-04-18 Thread A. Kulikov
How to I return an error from inside a user defined function? For example the following: CREATE or REPLACE FUNCTION drop_node (integer) RETURNS text AS ' DECLARE mleft INTEGER; mright INTEGER; BEGIN -- Check if the desired node exists SELECT lft, rgt FROM structure WHERE id = $1 INTO mleft, m

Re: [SQL] Nested Sets

2005-04-16 Thread A. Kulikov
? regards, alex 2005/4/16, Troels Arvin <[EMAIL PROTECTED]>: > On Sat, 16 Apr 2005 16:31:43 +0400, A. Kulikov wrote: > > > Has anyone implemented a pretty Nested Sets solution in > > PostgreSQL? > > Maybe this is useful? : > http://threebit.net/t

[SQL] Nested Sets

2005-04-16 Thread A. Kulikov
lists have yielded little results, perharps I am missing something. Has anyone implemented a pretty Nested Sets solution in PostgreSQL? Or is this considered black voodoo and noone wants to show their solutions to the world? with regards, A. Kulikov -- The mind is essential -- http://essenti