Search Postgresql Archives

Re: Entering a character code in a query

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

 



John Gage wrote:
> I would like to use the following query:
> 
> SELECT english || '\n' || english || '\x2028' || french AS 
> output FROM vocab_words_translated;
> 
> where \x2028 is the hexadecimal code for a soft carriage return.
> 
> However, this does not work.
> 
> Can anyone help with this problem?

If you have PostgreSQL 8.4 with standard_conforming_strings = on,
you could write:

english || E'\n' || english || U&'\2028' || french

Otherwise, you have to resort to

english || E'\n' || english || chr(8232) || french

(provided your server_encoding is UTF8).

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux