Re: [GENERAL] plpgsql code doen't work

2013-09-10 Thread Giuseppe Broccolo
Il 10/09/2013 10:46, Beena Emerson ha scritto: Hello, Try changing the variable left to something other like left_val. It will work. Maybe the problem is because LEFT is a keyword. Yes, left() is a function returning a 'text'. There's a conflict when you define it as an 'integer'... Giusepp

Re: [GENERAL] plpgsql code doen't work

2013-09-10 Thread Beena Emerson
Hello, Try changing the variable left to something other like left_val. It will work. Maybe the problem is because LEFT is a keyword. Beena Emerson

[GENERAL] plpgsql code doen't work

2013-09-10 Thread janek12
Hi,    I found following code: create or replace function plpgsql_edit_distance(stra text, strb text) returns integer as $$ declare rows integer; cols integer; begin rows := length(stra); cols := length(strb); IF rows = 0 THEN return cols; END IF; IF co