From: | "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | error creating sql function |
Date: | 2004-01-17 01:33:05 |
Message-ID: | 400890D1.7070408@zeut.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I was trying to create a sql function today (see below) using
postgresql 7.3.3. I don't see how to get around this error, anyone
have any suggestions?
Thanks much,
Matthew
tocr=# CREATE OR REPLACE FUNCTION public.update_dncl(bpchar, bpchar)
tocr-# RETURNS void AS
tocr-# '
tocr'# begin;
tocr'# update area_codes
tocr'# set last_updated = now()
tocr'# where code = $1;
tocr'# DELETE from do_not_call_list
tocr'# where area_code = $1;
tocr'# copy do_not_call_list (area_code, number) from $2 with delimiter
as \',\';
tocr'# commit;
tocr'# '
tocr-# LANGUAGE 'sql' VOLATILE;
ERROR: parser: parse error at or near "$2" at character 178
tocr=# COMMENT ON FUNCTION public.update_dncl(bpchar, bpchar) IS 'Will
be used to update an area code in the DNCL tables.';
COMMENT
tocr=# SELECT version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
20020903 (Red Hat Linux 8.0 3.2-7)
(1 row)
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2004-01-17 01:49:10 | Re: error creating sql function |
Previous Message | Chris Ochs | 2004-01-17 01:17:25 | Re: embedded/"serverless" (Re: serverless postgresql) |