unterminated dollar-quoted string at or near "$$ language plpgsql; " at character 1

From: "Mikael Carneholm" <Mikael(dot)Carneholm(at)WirelessCar(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: unterminated dollar-quoted string at or near "$$ language plpgsql; " at character 1
Date: 2006-03-20 10:49:28
Message-ID: 7F10D26ECFA1FB458B89C5B4B0D72C2B088288@sesrv12.wirelesscar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

This seems to be a psql(?) bug:

test.sql
--------
create or replace function test1() returns void as $$
declare
var1 integer;
var2 integer;
var3 integer;
begin
end;
$$ language plpgsql;

miano=> \i test.sql
psql:test.sql:3: ERROR: unterminated dollar-quoted string at or near "$$
declare
var1 integer;" at character 52
psql:test.sql:4: ERROR: syntax error at or near "var2" at character 3
psql:test.sql:5: ERROR: syntax error at or near "var3" at character 3
psql:test.sql:7: ERROR: syntax error at or near "end" at character 7
psql:test.sql:8: ERROR: unterminated dollar-quoted string at or near "$$ language plpgsql;" at character 1

It compiles when run from the PgAdmin III Query tool, but fails when run from psql (see above output).

miano=> select version();
version
---------------------------------------------------------------------------------------------------
PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2006-03-20 11:45:16 Re: unterminated dollar-quoted string at or near "$$ language plpgsql; " at character 1
Previous Message Dhanaraj M - Sun Microsystems 2006-03-20 08:57:47 how to put back?