Re: [SQL] Select for LEFT JOIN

2001-05-28 Thread Anatoly K. Lasareff
sql LL> statement know that they are different. LL> Please help.. .thanks You have to use full-qualifyed field names, like this: select trr.abc, soc.abc, In addition you can use aliases for field names: select trr.abc as abc1, soc.abc as abc2, -- Anatoly K. Lasareff

Re: [SQL] Transactions in PLPGSQL?

2001-02-06 Thread Anatoly K. Lasareff
ansaction control statemens, but elements of plpgsql language. KC> Should I just put a 'rollback' in the function, or do I need to do something KC> special? You _cannot_ use any transaction control statemens (commit, rollback) into plpgsql function. So all the fun

Re: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Anatoly K. Lasareff
field and table identifiers should be passed to function quote_ident(). Variables containing literal elements of the dynamic query string should be passed to quote_literal(). Both take the appropriate steps to return the input text enclosed in single or double quotes and with any embedded special characters intact. -- Anatoly K. Lasareff Email:[EMAIL PROTECTED] http://tolikus.hq.aaanet.ru:8080Phone: (8632)-710071

Re: [SQL] Null function parameters

2000-08-24 Thread Anatoly K. Lasareff
>>>>> "TL" == Tom Lane <[EMAIL PROTECTED]> writes: TL> [EMAIL PROTECTED] (Anatoly K. Lasareff) writes: >> I'afraid no. My question is: if I pass one null argument into function >> then all other argumens, which are not null, became null i

Re: [SQL] Null function parameters

2000-08-23 Thread Anatoly K. Lasareff
include it in future releases? GV> Regards GV> Graham GV> -Original Message- GV> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On GV> Behalf Of Anatoly K. Lasareff GV> Sent: 23 August 2000 12:46 GV> To: Tom Lane GV> Cc: Graham Vickrage; postgresql GV&g

Re: [SQL] Null function parameters

2000-08-23 Thread Anatoly K. Lasareff
s null then return $2; end if; return $1; end; ' language 'plpgsql'; tolik=# select a(1,2); NOTICE: 1: 1 2: 2 a --- 1 (1 row) tolik=# select a(null,2); NOTICE: 1: 2: a --- (1 row) -- Anatoly K. Lasareff Email: [EMAIL PROTECTED]

Re: [SQL] trigger or something else?

2000-07-03 Thread Anatoly K. Lasareff
d ---+-- qq| ww (1 rows) Unfortunately this way suits for select only, not for 'insert into b' and 'update b' statement. -- Anatoly K. Lasareff Email: [EMAIL PROTECTED]