Re: Text <-> C string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Text <-> C string
Date: 2007-09-22 23:45:24
Message-ID: 6194.1190504724@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> The thing that's got me confused at the moment is what naming
> convention to use for the functions.

Well, almost any convention you like has some precedent somewhere in
the PG code, given all the contributors over the years. Almost the
only thing we actively discourage is Hungarian notation, and I think
there's even some of that in some corners.

Personally I would vote against something like TextPGetCString because
it would look like one of the family of macros that are named FooGetBar.
Maybe use text_to_cstring and cstring_to_text? It's not real important
though.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-09-23 12:44:04 Re: [PATCHES] Eliminate more detoast copies for packed varlenas
Previous Message Brendan Jurd 2007-09-22 22:11:08 Re: [HACKERS] Add function for quote_qualified_identifier?

Browse pgsql-patches by date

  From Date Subject
Next Message Jaime Casanova 2007-09-23 04:49:28 Re: [HACKERS] 'Waiting on lock'
Previous Message Brendan Jurd 2007-09-22 22:11:08 Re: [HACKERS] Add function for quote_qualified_identifier?