Search Postgresql Archives

Re: Syntax error at or near "$1"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ryan Booz <rxb19@psu.edu> writes:
> I can't find any reason for the error below:

CVS tip gives a slightly more complete error message:

regression=# select list_devices('123456789012');
ERROR:  syntax error at or near "$1" at character 30
QUERY:  SELECT  device_type_id FROM  $1  WHERE mac_address =  $2
CONTEXT:  PL/pgSQL function "list_devices" line 7 at for over select rows
LINE 1: SELECT  device_type_id FROM  $1  WHERE mac_address =  $2
                                     ^
regression=#

This might or might not help you figure out the problem: you used
"devices" as both a plpgsql variable name and a referenced table.
Pick another name for the variable.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux