Re: does parser still parse those comment out lines? - Mailing list pgsql-general

From Tom Lane
Subject Re: does parser still parse those comment out lines?
Date
Msg-id 21838.1050766832@sss.pgh.pa.us
Whole thread Raw
In response to does parser still parse those comment out lines?  (weiping He <laser@zhengmai.com.cn>)
List pgsql-general
weiping He <laser@zhengmai.com.cn> writes:

> create or replace function test() returns integer as '
> begin
> -- raise NOTICE ''can't comment out!'';
                       ^

You have to double that quote mark, too.  The string-literal parser
doesn't pay any attention to what's inside the string; the fact that
this area of the string would be a comment according to plpgsql's
rules doesn't change what the parser is going to think is the end of
the string literal.

            regards, tom lane


pgsql-general by date:

Previous
From: Alessandro Bottoni
Date:
Subject: Status of the PGSQL replication projects?
Next
From: Bruno Wolff III
Date:
Subject: stddev returns 0 when there is one row