Re: Re: temp-table-related failure in regression tests

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: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: temp-table-related failure in regression tests
Date: 2001-06-19 12:03:24
Message-ID: 200106191203.f5JC3P708115@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I wrote:
> > Is anyone else seeing this with current CVS, or is it my own breakage?
>
> Ah, the problem is RelationGetRelationName didn't know about the
> new temprel naming convention.

Sorry, yes, I missed changing that. I thought I had all the pg_temp
mapped to defines but I missed that one and hence didn't change to
underscore names.

>
> I quick-hacked rel.h to fix this, but we need a better solution.
> I don't much like having rel.h include temprel.h --- seems like the
> include should go the other way. Should is_temp_relname get moved
> to rel.h?

You will see near the top of rel.h:

/* added to prevent circular dependency. bjm 1999/11/15 */
extern char *get_temp_rel_by_physicalname(const char *relname);

so it seems there is an interdependency between rel.h and temprel.h.
Trying to include temprel.h in rel.h causes a compile problem. Going
the other way I assume would cause the same problem.

We can move the is_temp_relname define if you wish but with one hack
already in rel.h for get_temp_rel_by_physicalname(), I am not excited
about adding another to rel.h. In fact, is_temp_relname needs
PG_TEMP_REL_PREFIX so we would have to move it too. However, I don't
see any other solution so I moved both to from temprel.h to rel.h.

I am attaching a fix that I have committed to CVS. If you don't like
it, feel free to reverse it out and try something else. Seems to
compile fine.

I will be speaking at Red Hat HQ today so will not be available to
reverse it out myself.

--
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

Attachment Content-Type Size
unknown_filename text/plain 4.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-06-19 12:06:27 PlPerl compile failure
Previous Message Zeugswetter Andreas SB 2001-06-19 07:21:07 AW: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. S tand ards