pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Emcisc (JinWei) Zhao <ezhao@telecomsys.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Error on pg_settings.bytea_output for pg9.1
Date: Tue, 31 Jul 2012 10:19:05 +0800
Message-ID: <50174099.1050701@ringerc.id.au> (raw)
In-Reply-To: <DB3116D1C87FBA46843F046CE6DC5AC102831EF7@tj-exchange3.NIMONE.COM>
References: <DB3116D1C87FBA46843F046CE6DC5AC102831EF7@tj-exchange3.NIMONE.COM>

On 07/30/2012 11:49 AM, Emcisc (JinWei) Zhao wrote:
> 5.Run the SQL query: "SELECT setting FROM pg_settings WHERE name = 
> 'bytea_output';  " in pgAdmin3. It will show you the value 'escape'.
>
> 6.Run the client application 'psql' to connect to the same DB server 
> and database with the same user account. And in psql interactive 
> terminal, run the same SQL:
>
> "SELECT setting FROM pg_settings WHERE name = 'bytea_output';  ". It 
> will show you the value 'hex', NOT the previous value 'escape'.
>
> 7.That means, the same environment, the same SQL query, but different 
> output. And I don't touch the file <postgresql.conf> any more ever before.
>
> Is this a bug of pgAdmin3?
>

I don't know if it's a bug as such, but it's certainly a curious 
decision if what you describe is the intended behaviour. It sounds like 
PgAdmin-III might be sending a SET bytea_output = 'escape' query during 
connection setup.

bytea_output is a per-session parameter. Each session (connection) to 
PostgreSQL can have a different value, and it can be changed within the 
session.

Check the PgAdmin-III preferences; there may be an option to control its 
preferred bytea format. It may also be worth turning on log_statement = 
'all' in postgresql.conf, starting PgAdmin-III, then looking at the 
PostgreSQL logs to see if PgAdmin-III is in fact sending a `SET 
bytea_output` command.

--
Craig Ringer

view thread (6+ messages)  latest in thread

Message-ID: <50174099.1050701@ringerc.id.au>
Permalink:  ../50174099.1050701@ringerc.id.au/
Also on:    postgresql.org/message-id/50174099.1050701@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ringerc@ringerc.id.au, ezhao@telecomsys.com
  Subject: Re: Error on pg_settings.bytea_output for pg9.1
  In-Reply-To: <50174099.1050701@ringerc.id.au>
  References: <DB3116D1C87FBA46843F046CE6DC5AC102831EF7@tj-exchange3.NIMONE.COM> <50174099.1050701@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox