Re: Patch from RM1983 [pgAdmin4]

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Subject: Re: Patch from RM1983 [pgAdmin4]
Date: 2017-02-09 11:04:56
Message-ID: CA+OCxox2qKkEOJST56-fjdta2PLDFh-tKnk+ACRte4W7H3UbzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Harshal,

I had a brief discussion with Ashesh about this. He's going to setup a
call next week for us to discuss a plan of action for eliminating any
remaining encoding issues including this one. I'm putting this on hold
until then.

Thanks.

On Mon, Feb 6, 2017 at 2:54 PM, Harshal Dhumal
<harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
> Hi Dave,
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Feb 6, 2017 at 6:48 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> Hi
>>
>> On Mon, Feb 6, 2017 at 12:57 PM, Harshal Dhumal
>> <harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
>> > Hi,
>> >
>> > Please find attached patch for RM 1983.
>> >
>> > This issue only occurs when database encoding is other than utf-8
>> >
>> > Also other issue was when we use connection of database with encoding
>> > other
>> > than utf-8 to retrieve data from cluster table/s which has encoding
>> > utf-8
>> > (e.g. pg_database) then data was not decoded properly.
>>
>> The code makes an assumption that pg_database is always utf-8 encoded.
>> I don't believe that is correct - I believe it's the encoding used in
>> the database from which the new database was created. The general
>> advice is that users should avoid using non-7bit ASCII characters in
>> shared catalogs, e.g. databases and comments etc.
>
>
> Ok.
>
> Let me split this into two issues:
> i) RM1983 for which I have attached updated patch. (basically I removed
> changes related to decode data retried from pg_database when connection
> encoding is other than utf-8)
> ii) Support to allow user to use non-&bit ASCII characters in shared
> catalogs with the help of pgAdmin4.
>
> Regarding your statement about pg_database "I believe it's the encoding used
> in the database from which the new database was created.". I found it
> little-bit confusing for me (correct me if i'm wrong); As mentioned here
> there is only one copy of pg_database per cluster. So I assume pg_database
> is created when we initialize database cluster and not when we create new
> database.
>
>
>>
>>
>> See
>> https://www.postgresql.org/message-id/flat/20160216163833(dot)GF31273%40momjian(dot)us#20160216163833(dot)GF31273(at)momjian(dot)us
>> for more info for example.
>>
>> Did pgAdmin 3 just assume it was UTF-8? I suspect it did - and that
>> just happened to work in most cases.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-02-09 12:05:13 pgAdmin 4 commit: Fix the issue with Jinja conditions in Foreign Data W
Previous Message Dave Page 2017-02-09 09:37:30 Re: [patch] RM2163 emboldened syntax highlighting