Re: does parser still parse those comment out lines?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: weiping He <laser(at)zhengmai(dot)com(dot)cn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: does parser still parse those comment out lines?
Date: 2003-04-19 15:40:32
Message-ID: 21838.1050766832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

weiping He <laser(at)zhengmai(dot)com(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-19 15:58:48 Re: [SQL] Yet Another (Simple) Case of Index not used
Previous Message Alessandro Bottoni 2003-04-19 14:28:46 Status of the PGSQL replication projects?