| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Gerhard Häring <lists(at)ghaering(dot)de>, pgsql-interfaces(at)postgresql(dot)org |
| Subject: | Re: I want to send comments to the backend! |
| Date: | 2003-03-21 05:55:20 |
| Message-ID: | 200303210555.h2L5tKG10364@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > OK, this patch fixes the comment passing bug. I remove the strspn() and
> > added a boolean to test if any parsetree had been generated --- if not,
> > I call NullCommand().
>
> Seems like the hard way. I had in mind a quick
>
> if (parsetree_list == NIL)
> {
> NullCommand(dest);
> return;
> }
>
> before entering the main loop. It'd take a small amount of reordering
> of the existing code to make this happen without adding any more code
> than that, but it looked doable.
The problem is that there is so much startup/shutdown in that function
that adding a quick exit point seems too error-prone for maintenance,
rather than keeping the existing structure.
I used your idea of testing just 'parsetree_list' and the patch is now
smaller.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 2.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-03-21 05:59:56 | Re: I want to send comments to the backend! |
| Previous Message | Tom Lane | 2003-03-21 05:41:34 | Re: I want to send comments to the backend! |