Skip site navigation (1) Skip section navigation (2)

psqlexception syntax error at or near "$"

From: Steven Dahlin <pgdb(dot)sldahlin(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: psqlexception syntax error at or near "$"
Date: 2010-11-09 14:37:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
In attempting to execute ddl that will create functions I am getting errors
which will not allow the functions to be created.  In running with the 8.4
driver if I attempt the following:

CREATE OR REPLACE FUNCTION system_info_fnc01() RETURNS trigger AS
  iCnt       integer;
  select count(*) into  iCnt from  system_info;
  if ( iCnt > 0 ) then
     raise exception ''System Info record already present'';
  end if;
  return new;

I get an error with the $$.  In substituting an ' for $$ the following
*unterminated quoted string at or near "' declare iCnt integer"*

If I then set the delimiter to something like '|' I still get the
unterminated quote string problem. Could someone tell me how to get around
this problem?



pgsql-jdbc by date

Next:From: Kevin GrittnerDate: 2010-11-09 14:53:18
Subject: Re: psqlexception syntax error at or near "$"
Previous:From: Michael ForkDate: 2010-11-08 13:54:30
Subject: PSQLException: The column name <col> was not found in this ResultSet.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group