Alex Pilosov <alex(at)pilosoft(dot)com> writes:
> True true. On other hand, unlike union, its automatically typechecked, you
> cannot by mistake reference a field you shouldn't be referencing.
Only true to the extent that you have cast a generic pointer to the
correct type to begin with. However, we've probably wasted more time
arguing the point than it's really worth.
I would suggest leaving off the final semicolon in the macro definition
so that you can write
typedef struct RangeTblEntryRelation
{
RTE_COMMON_FIELDS;
/* Fields valid for a plain relation RTE */
char *relname; /* real name of the relation */
Oid relid; /* OID of the relation */
Without this, tools like pgindent will almost certainly mess up these
struct declarations (I know emacs' C mode will get it wrong...)
regards, tom lane
In response to
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2001-07-03 19:01:05 |
| Subject: Re: stuck spin lock with many concurrent users |
| Previous: | From: Naomi Walker | Date: 2001-07-03 18:16:28 |
| Subject: Re: [OT] Any major users of postgresql? |