Re: Function syntax checking - Mailing list pgsql-general

From Tom Lane
Subject Re: Function syntax checking
Date
Msg-id 29747.1098665791@sss.pgh.pa.us
Whole thread Raw
In response to Function syntax checking  (Karim Nassar <Karim.Nassar@NAU.EDU>)
List pgsql-general
Karim Nassar <Karim.Nassar@NAU.EDU> writes:
> I am writing functions and I find it curious that CREATE FUNCTION does
> not do syntax checking.

Try 8.0 ;-)

regression=# CREATE FUNCTION foo(INTEGER) RETURNS BOOLEAN
regression-# AS 'this is total crap' LANGUAGE plpgsql;
ERROR:  syntax error at or near "this" at character 50
LINE 2: AS 'this is total crap' LANGUAGE plpgsql;
            ^

We could be doing more along this line, but it's a start ...

            regards, tom lane

pgsql-general by date:

Previous
From: "Ricardo Perez Lopez"
Date:
Subject: Re: '1 year' = '360 days' ????
Next
From: Tom Lane
Date:
Subject: Re: Memory exhausted on DELETE.