"Brendan Jurd" <direvus@gmail.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