pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Support for U+0000 text
3+ messages / 3 participants
[nested] [flat]

* Support for U+0000 text
@ 2019-03-07 03:06  Paul Draper <paulddraper@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Paul Draper @ 2019-03-07 03:06 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

When inserting the U+0000 (NULL) character, PostgreSQL errors:

ERROR: invalid byte sequence for encoding "UTF8": 0x00

I understand I could not use the text type, but given that this is a valid
Unicode character, is there a reason this is not supported?

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Support for U+0000 text
@ 2019-03-07 03:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Paul Draper <paulddraper@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-03-07 03:40 UTC (permalink / raw)
  To: Paul Draper <paulddraper@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

Paul Draper <paulddraper@gmail.com> writes:
> When inserting the U+0000 (NULL) character, PostgreSQL errors:
> ERROR: invalid byte sequence for encoding "UTF8": 0x00

> I understand I could not use the text type, but given that this is a valid
> Unicode character, is there a reason this is not supported?

Yes: internally, the text representation of all data types is a C string,
ie a \0-terminated string.  That's not something that's practical to
change.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Support for U+0000 text
@ 2019-03-07 03:59  Shreeyansh Dba <shreeyansh2014@gmail.com>
  parent: Paul Draper <paulddraper@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Shreeyansh Dba @ 2019-03-07 03:59 UTC (permalink / raw)
  To: Paul Draper <paulddraper@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hi Paul,

Go through below link hope this will help you.
https://www.postgresql.org/docs/9.0/multibyte.html

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com


On Thu, Mar 7, 2019 at 8:36 AM Paul Draper <paulddraper@gmail.com> wrote:

> When inserting the U+0000 (NULL) character, PostgreSQL errors:
>
> ERROR: invalid byte sequence for encoding "UTF8": 0x00
>
> I understand I could not use the text type, but given that this is a valid
> Unicode character, is there a reason this is not supported?
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-03-07 03:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 03:06 Support for U+0000 text Paul Draper <paulddraper@gmail.com>
2019-03-07 03:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-03-07 03:59 ` Shreeyansh Dba <shreeyansh2014@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox