Re: PQgetlength vs. octet_length()

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Greg Stark *EXTERN*" <gsstark(at)mit(dot)edu>, "Michael Clark" <codingninja(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PQgetlength vs. octet_length()
Date: 2009-08-19 07:11:11
Message-ID: D960CB61B694CF459DCFB4B0128514C203937ED0@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Greg Stark wrote:
> If you use binary encoding then you don't have to deal with that.
> Though I seem to recall there is still a gotcha you have to worry
> about if there are nul bytes in your datum. I don't recall exactly
> what that meant you had to do though.

As far as I know, it only means that you shouldn't use strcpy, strlen
and friends on a binary string.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2009-08-19 07:14:09 Re: question about /etc/init.d/postgresql in PGDG
Previous Message Craig Ringer 2009-08-19 07:06:14 Re: Idle processes chewing up CPU?

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2009-08-19 07:47:43 Re: PQgetlength vs. octet_length()
Previous Message Fujii Masao 2009-08-19 06:38:35 Re: BUG #4961: pg_standby.exe crashes with no args