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)
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly