On Mon, Jan 17, 2005 at 05:46:20AM +0100, LENGYEL Zoltan wrote: > uri alias for $3; ... > insert into uri (articleid,uri,uritype) values (article_id,uri,urit_id); PostgreSQL 8.0 will give more context for the error, making it easier to spot the problem: ERROR: syntax error at or near "$1" at character 14 QUERY: insert into $1 (articleid, $2 ,uritype) values ( $3 , $4 , $5 ) CONTEXT: PL/pgSQL function "new_uri" line 20 at SQL statement LINE 1: insert into $1 (articleid, $2 ,uritype) values ( $3 , $4 ,... The variable "uri" is apparently also the name of a table and a column in that table. Use a different name for the variable. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly