Re: BUG #5092: to_ascii(); ascii() don't work with bytea

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dan French <Bomarc_com(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5092: to_ascii(); ascii() don't work with bytea
Date: 2009-10-02 07:54:53
Message-ID: 1254470093.10783.3.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 2009-10-02 at 02:17 +0000, Dan French wrote:
> #1: bytea_string = '"0"' (table; bytea)
> Function:
> trim('"' both from bytea_string)
> fails and returns: '"0'

Works for me. Please submit a complete test case.

> #2: Come on folks: Bytea is a series of bytes. Conversion to ASCII is not
> this difficult; and should (does) not require explicit type casts (esp since
> they are already in ASCII)

Converting between data types that have different semantics should
always requires an explicit cast. This is to protect against accidental
misinterpretation. There is ample discussion about that in the
archives.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Akira Kurosawa 2009-10-02 10:59:43 BUG #5095: pg_statio_xxx_sequences does not work
Previous Message Sergey Tomoulevitch 2009-10-02 07:35:10 BUG #5094: bad result in dblink_get_result when async command sending