Re: bytea_output vs make installcheck

From: neha khatri <nehakhatri5(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bytea_output vs make installcheck
Date: 2017-02-15 05:02:14
Message-ID: CAFO0U+9w1oP=gKXt86Lu1GDE24gQkDZaGDCs2s26uGUdX=cDPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Wed, Feb 15, 2017 at 10:04 AM, neha khatri <nehakhatri5(at)gmail(dot)com>
wrote:.
>
>
>> Attached are two options for doing that. One overrides bytea_output
>> locally where-ever needed, and the other overrides it for the entire
>> 'regression' database.
>>
>
> The solution that overrides bytea_output locally looks appropriate. It may
> not be required to change the format for entire database.
> Had there been a way to convert bytea_output from 'hex' to 'escape'
> internally, that could have simplified this customization even more.
>

Well, the conversion from 'hex' to 'escape' is available using the function
encode().
So the queries that are failing due to the setting bytea_output = escape,
can be wrapped under encode(), to obtain the result in 'escape' format.
Here is another way to resolve the same problem. The patch is attached.

Regards,
Neha

Attachment Content-Type Size
intallcheck_bytea_output_escape.patch application/octet-stream 6.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-02-15 05:17:59 Re: bytea_output vs make installcheck
Previous Message Michael Paquier 2017-02-15 04:56:23 Re: Provide list of subscriptions and publications in psql's completion