Thread: fix recent WITH OIDS bug

fix recent WITH OIDS bug

From
Neil Conway
Date:
This patch fixes a bug I introduced in the recent CREATE TABLE AS / WITH
OIDS work. The patch should be pretty straight-forward.

The only question I have is whether analyze.c (and therefore
analyze.h) is the right place to put the new utility function
interpretOidsOption() -- can anyone suggest a better location?

Unless anyone objects, I plan to apply this within 24 hours.

-Neil

Attachment

Re: fix recent WITH OIDS bug

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> The only question I have is whether analyze.c (and therefore
> analyze.h) is the right place to put the new utility function
> interpretOidsOption() -- can anyone suggest a better location?

You could possibly put it next to the existing function
interpretInhOption(), which does essentially the same kind of thing
and for the same reason.  However, I can't argue that that function's
placement in parse_clause.c has any real strong motivation either...

            regards, tom lane

Re: fix recent WITH OIDS bug

From
Neil Conway
Date:
Tom Lane <tgl@sss.pgh.pa.us> writes:
> You could possibly put it next to the existing function
> interpretInhOption(), which does essentially the same kind of thing
> and for the same reason.  However, I can't argue that that
> function's placement in parse_clause.c has any real strong
> motivation either...

Yeah, I had considered that, but hesitated for the same reason you
cite. Is it worth creating a parse_util.c, perhaps? makeObjectName()
and CheckSelectForUpdate() from analyze.c might be worth moving there
as well...

-Neil


Re: fix recent WITH OIDS bug

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> Yeah, I had considered that, but hesitated for the same reason you
> cite. Is it worth creating a parse_util.c, perhaps?

Okay with me, if you feel like taking the trouble.

            regards, tom lane