Re: pgpsql help - Mailing list pgsql-general

From Michael Fuhr
Subject Re: pgpsql help
Date
Msg-id 20050117050216.GA91823@winnie.fuhr.org
Whole thread Raw
In response to pgpsql help  (LENGYEL Zoltan <warnew@warnew.nomaam.hu>)
List pgsql-general
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/

pgsql-general by date:

Previous
From: "Mike G."
Date:
Subject: Re: pgpsql help
Next
From: Tom Lane
Date:
Subject: Re: pgpsql help