I´m trying to create a function to obtain the possition of a substring, but
i don't kown if is correct
can anyone can help me to do this?
test=# CREATE FUNCTION pos1 (int4) RETURNS int4 AS '
test'# UPDATE tabla1
test'# SET posicion1 = position('pm' in SELECT string1 FROM tabla1 WHERE
id = $1)
test'# WHERE id = $1;
test'# SELECT posicion1 FROM tabla1 WHERE id = $1;
test'# 'LANGUAGE sql;
ERROR: parser: parse error at or near "pm"
thanks for your help
pgsql-novice by date
|Next:||From: Josh Berkus||Date: 2002-04-17 16:13:35|
|Subject: Re: cannot restore db|
|Previous:||From: pg sql||Date: 2002-04-17 14:21:45|
|Subject: Re: [DOCS] Upgrading - How? - Administrator's Guide ??|