Re: [SQL] using string functions on plpgsql

2008-04-16 Thread Tom Lane
Craig Ringer <[EMAIL PROTECTED]> writes: > i = length(texto) >> ^^^ >> >> i := length(texto) > Whoops, I spoke too soon - it seems both are valid for assignment. Has > that always been true? Yeah, it's not documented, but AFAIK plpgsql has always taken both. regards, t

Re: [SQL] using string functions on plpgsql

2008-04-16 Thread Craig Ringer
Craig Ringer wrote: Marcelo Edgardo Paniagua Lizarraga wrote: declare i integer; begin ... i = length(texto) ^^^ i := length(texto) Whoops, I spoke too soon - it seems both are valid for assignment. Has that always been true? The one time I don't write a small test before

Re: [SQL] using string functions on plpgsql

2008-04-16 Thread Craig Ringer
Marcelo Edgardo Paniagua Lizarraga wrote: declare i integer; begin ... i = length(texto) ^^^ i := length(texto) -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] using string functions on plpgsql

2008-04-16 Thread Tom Lane
"Marcelo Edgardo Paniagua Lizarraga" <[EMAIL PROTECTED]> writes: > I'm starting to create my firsts plpgsql functions, and I was > wondering how to use the string function 'length' in the code of the > fuction. I have tried so far and I get an error. There's nothing obviously wrong with what you p