From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Text <-> C string |
Date: | 2008-03-25 18:05:57 |
Message-ID: | 200803251805.m2PI5wu07323@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> > 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)
I think I like buffer.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-03-25 18:08:19 | Re: Text <-> C string |
Previous Message | Bruce Momjian | 2008-03-25 18:04:37 | Re: pg_dump -i wording |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-03-25 18:08:19 | Re: Text <-> C string |
Previous Message | Bruce Momjian | 2008-03-25 18:04:37 | Re: pg_dump -i wording |