Re: cli in sql? - Mailing list pgsql-sql

From Tom Lane
Subject Re: cli in sql?
Date
Msg-id 22464.1131751632@sss.pgh.pa.us
Whole thread Raw
In response to Re: cli in sql?  (Frank Bax <fbax@sympatico.ca>)
List pgsql-sql
Frank Bax <fbax@sympatico.ca> writes:
> This looks interesting!  But I'm not sure how to use it?
> wbax=> select version();
>                                 version
> ---------------------------------------------------------------------
>   PostgreSQL 7.4.3 on i386-unknown-openbsd3.6, compiled by GCC 2.95.3
> (1 row)

> wbax=> CREATE OR REPLACE FUNCTION filemodtime(TEXT) RETURNS TEXT LANGUAGE 
> plperlu AS
> wbax-> $$
> wbax-> my $filename = shift;
> ERROR:  syntax error at or near "$" at character 80

PG 7.4 doesn't understand $$ quotes --- you need to convert the function
body to old-style quoting.  Or upgrade ;-)  See
http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-SYNTAX-CONSTANTS
for details, esp. section 4.1.2.2.
        regards, tom lane


pgsql-sql by date:

Previous
From: Judith Altamirano Figueroa
Date:
Subject: pg_dump
Next
From: "Steve SAUTETNER"
Date:
Subject: Problem with "NOT IN (subquery)