Re: [HACKERS] bytea_output vs make installcheck - Mailing list pgsql-hackers

From neha khatri
Subject Re: [HACKERS] bytea_output vs make installcheck
Date
Msg-id CAFO0U+9w1oP=gKXt86Lu1GDE24gQkDZaGDCs2s26uGUdX=cDPg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] bytea_output vs make installcheck  (neha khatri <nehakhatri5@gmail.com>)
Responses Re: [HACKERS] bytea_output vs make installcheck  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers

On Wed, Feb 15, 2017 at 10:04 AM, neha khatri <nehakhatri5@gmail.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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] bytea_output vs make installcheck