Re: how to handle data containing '\0'

From: Marc Herbert <Marc(dot)Herbert(at)continuent(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: how to handle data containing '\0'
Date: 2006-05-17 13:13:03
Message-ID: khjd5ecvlpc.fsf@meije.emic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"EBIHARA, Yuichiro" <ebihara(at)iplocks(dot)co(dot)jp> writes:

>
> I need to handle String data containing '\0' in my Java + JDBC program. Such data can happen at other systems and be sent to
> PostgreSQL. Here is a sample to simulate it in Java code.

As far as I know, it is not possible to store such strings in a
postgreSQL database (whatever the client interface used). The reason
seems to be that postgreSQL is written in C, and most C functions use
\0 as a string terminator.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Larry Rosenman 2006-05-17 13:48:21 Re: how to handle data containing '\0'
Previous Message EBIHARA, Yuichiro 2006-05-17 12:01:30 how to handle data containing '\0'