Tom Lane escribió:
> "Brendan Jurd" <[EMAIL PROTECTED]> writes:

> > A text_to_cstring_with_len() or text_to_cstring_limit() might be more
> > to the point, and more consistent with the other functions in the
> > family.
> 
> Hmm.  The thing that's bothering me is that the length is the size
> of the *destination*, which is not like cstring_to_text_with_len,
> so using a closely similar name might be confusing.  Of those two
> I'd go with text_to_cstring_limit.  Another thought that comes to
> mind is
> 
> void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len)

text_to_cstring_buffer seems okay.  I did wonder for a bit whether it
should be 

void text_to_cstring_buffer(const text *src, char *buf, size_t buf_len)

but then the src/dst pair seems better than src/buf.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to