Name type vs. char *

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Name type vs. char *
Date: 1998-07-20 04:48:58
Message-ID: 199807200448.AAA17784@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We currently use Name sometimes, and char* other times to store
relation, attribute, type, and view names.

One thing Mariposa did was to make that more consistent, so you passed
around Name(NameData pointers) instead of the more generic char *.
However, the Name fields behave like char*, but are clearer.

typedef struct nameData
{
char data[NAMEDATALEN];
} NameData;
typedef NameData *Name;

Do people see value in making this switch? Would take me a few hours to
make the change.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maarten Boekhold 1998-07-20 07:07:34 Re: [GENERAL] Recalling previous commands at the PSQL prompt
Previous Message Vadim Mikheev 1998-07-20 03:26:40 Re: [HACKERS] proposals for LLL, part 1