Thread: Function ascii(text) character -> byte

Function ascii(text) character -> byte

From
Ian Barwick
Date:
Hi

in the docs, the function "ascii(text)" is described as
returning "ASCII code of the first character of the argument"

(see http://www.postgresql.org/docs/8.1/interactive/functions-string.html,
Table  9-6. "Other String Functions").

Presumably this should read "ASCII code of the first byte of the argument",
which is what is returned when the argument is a multi-byte character
(although then with UTF-8 at least that might not necessarily be an ASCII
code).

Regards

Ian Barwick

Re: Function ascii(text) character -> byte

From
Bruce Momjian
Date:
Patch applied.  Thanks.  Your documentation changes can be viewed in
five minutes using links on the developer's page,
http://www.postgresql.org/developer/testing.


---------------------------------------------------------------------------


Ian Barwick wrote:
> Hi
>
> in the docs, the function "ascii(text)" is described as
> returning "ASCII code of the first character of the argument"
>
> (see http://www.postgresql.org/docs/8.1/interactive/functions-string.html,
> Table  9-6. "Other String Functions").
>
> Presumably this should read "ASCII code of the first byte of the argument",
> which is what is returned when the argument is a multi-byte character
> (although then with UTF-8 at least that might not necessarily be an ASCII
> code).
>
> Regards
>
> Ian Barwick
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>

--
  Bruce Momjian   http://candle.pha.pa.us
  SRA OSS, Inc.   http://www.sraoss.com

  + If your life is a hard drive, Christ can be your backup. +