Search Postgresql Archives

Re: converting text to bytea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





čt 25. 2. 2021 v 16:01 odesílatel Tom Lane <tgl@xxxxxxxxxxxxx> napsal:
Yambu <hyambu@xxxxxxxxx> writes:
> Is there a reason why i'm getting text when i run the below
> select convert_to('some_text', 'UTF8')    i get back 'some_text'

You must have bytea_output set to "escape".


yes

set bytea_output TO escape ;
postgres=# select convert_to('žlutý kůň', 'UTF8') ;
┌───────────────────────────────────────┐
│              convert_to               │
╞═══════════════════════════════════════╡
│ \305\276lut\303\275 k\305\257\305\210 │
└───────────────────────────────────────┘
(1 row)


                        regards, tom lane

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux