Re: plpgsql commenting broken?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Johnny Jørgensen" <pgsql(at)halfahead(dot)dk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql commenting broken?
Date: 2001-12-04 16:58:25
Message-ID: 200112041658.fB4GwPi03700@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> After quite a few hours of poring over my latest plpgsql dabbling, i found the error that caused import to barf, and I was a bit surprised, since the error was caused by a single apostrophe in a comment line
>
> -- check if the row isn't available
> [SQL thingie]
>
> of course, i could avoid the problem by rewriting my comments to
>
> -- check if the row is available
> [SQL thingie]
>
> but it seems to me, that commenting a line should cause the parser to ignore *everything* until the next newline?

Yes, this has bitten me before, particularly in awk script where the
script is single-quoted. I don't know a good solution for this.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-12-04 17:16:27 Re: Problem (bug?) with like
Previous Message Barry Lind 2001-12-04 16:44:50 Re: java stored procedures