Newbie in functions

Поиск
Список
Период
Сортировка
От Eduardo_Cadena@praxair.com
Тема Newbie in functions
Дата
Msg-id OF971F569C.5DDD7BD2-ON86256B9E.0051AFC5@praxair.com
обсуждение исходный текст
Ответы Re: Newbie in functions  (Chris <csmith@squiz.net>)
Список pgsql-novice
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"
test=#


thanks for your help


В списке pgsql-novice по дате отправления:

Предыдущее
От: "pg sql"
Дата:
Сообщение: Re: [DOCS] Upgrading - How? - Administrator's Guide ??
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: cannot restore db