Failed to create a function SOLVED

From: Roy MacGregor Paterson <roy(at)macgregortech(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Failed to create a function SOLVED
Date: 2003-12-03 08:29:16
Message-ID: p06010201bbf34cb5ac1a@[192.168.1.102]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks to all who helped out on this problem.

RTFM and trial by Kafka-esque error are truly wonderful things.

One of the problems I was having with creating functions was the
strange behaviour of psql (responding with a list of command options
for every line pasted) when I was copying and pasting them from
BBEdit files, like this snippet...

webdav=# CREATE FUNCTION trigger_WDVolume () RETURNS opaque AS '
webdav'# DECLARE
webdav'#
ABORT BEGIN COMMENT CREATE DROP GRANT LOAD
NOTIFY REVOKE SET UNLISTEN
ALTER CLOSE COMMIT DECLARE EXPLAIN INSERT LOCK
REINDEX ROLLBACK SHOW UPDATE
ANALYZE CLUSTER COPY DELETE FETCH LISTEN MOVE
RESET SELECT TRUNCATE VACUUM
webdav'# -- set the default disk space
webdav'#
ABORT BEGIN COMMENT CREATE DROP GRANT LOAD
NOTIFY REVOKE SET UNLISTEN
ALTER CLOSE COMMIT DECLARE EXPLAIN INSERT LOCK
REINDEX ROLLBACK SHOW UPDATE
ANALYZE CLUSTER COPY DELETE FETCH LISTEN MOVE
RESET SELECT TRUNCATE VACUUM

...it turns out that, despite comments about psql being quite happy
with all whitespace, it's not: it doesn't like tab chars (in PG 7.3.3
on Mac OS X at least). Convert tabs to 2xspaces and all is
tickety-boo.

Roy
--
--------------------
Roy MacGregor Paterson
MacGregorTech

t: +44 (0) 20 7584 7891
f: +44 (0) 20 7589 6223
m: +44 (0) 7803 163 938
w: www.macgregortech.com
e: roy(at)macgregortech(dot)com
--------------------

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Roy MacGregor Paterson 2003-12-03 08:51:29 Postmaster running, psql not SOLVED
Previous Message Roy MacGregor Paterson 2003-12-03 08:15:32 Environment variables SOLVED