Re: Unable to use '-' in column names in PLPGSQL
От | Martín Marqués |
---|---|
Тема | Re: Unable to use '-' in column names in PLPGSQL |
Дата | |
Msg-id | 20011115135755.B3BCA2AB3F@bugs.unl.edu.ar обсуждение исходный текст |
Ответ на | Unable to use '-' in column names in PLPGSQL ("Aasmund Midttun Godal" <postgresql@envisity.com>) |
Список | pgsql-sql |
On Jue 15 Nov 2001 10:38, you wrote: > CREATE FUNCTION is_parent(INTEGER, INTEGER) RETURNS BOOLEAN AS ' > DECLARE > parent ALIAS FOR $1; > tull ALIAS for $2; > kid INTEGER; > BEGIN > kid := tull; > LOOP > SELECT INTO kid "dir-id" FROM dir WHERE id = kid; > IF kid = parent THEN > RETURN TRUE; > END IF; > IF kid IS NULL THEN > RETURN FALSE; > END IF; > END LOOP; > END; > ' LANGUAGE 'plpgsql'; You shoun't use '-' in column names. Use '_' instead. Saludos... :-) P.D.: Doesn't it give you an error when you try to create the table with does column names? -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
В списке pgsql-sql по дате отправления: