Name type vs. char * - Mailing list pgsql-hackers

From Bruce Momjian
Subject Name type vs. char *
Date
Msg-id 199807200448.AAA17784@candle.pha.pa.us
Whole thread Raw
Responses Re: [HACKERS] Name type vs. char *
List 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@candle.pha.pa.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)

pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] proposals for LLL, part 1
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Name type vs. char *