BUG #14662: 'has_table_privilege()' function fails with error, "invalid name syntax" when using Japanese symbols

From: jmuise(at)esri(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14662: 'has_table_privilege()' function fails with error, "invalid name syntax" when using Japanese symbols
Date: 2017-05-19 16:23:16
Message-ID: 20170519162316.29945.5021@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14662
Logged by: Justin Muise
Email address: jmuise(at)esri(dot)com
PostgreSQL version: 9.5.3
Operating system: Windows 8.1
Description:

SYNOPSIS:
The 'has_table_privilege()' function will return the error, "invalid name
syntax", when the table used in the function contains certain Japanese
characters.

POSTGRESQL SPECIFIC INFORMATION:
Version:
"PostgreSQL 9.5.3, compiled by Visual C++ build 1800, 64-bit"

Special Installation requirements:
N/A

Special startup parameters:
N/A

OPERATING SYSTEM INFORMATION:
OS: Windows 8.1 Enterprise
Processor: Intel® Xeon® CPU E5-1620 v3 @ 3.50GHz
System type: 64-bit Operating System, x64-based processor

STEPS TO REPRODUCE:
1) Running the following SQL as the postgres user will cause the reported
error:
=====
create user viewer2;

create table land_場地
(id integer,
title varchar(40));

grant SELECT on table land_場地 to viewer2;

SELECT has_table_privilege('viewer2', 'land_場地', 'select');
=====

2) The full error reported is as follows:
=====
ERROR: invalid name syntax

********** Error **********

ERROR: invalid name syntax
SQL state: 42602
=====

3) I would expect the above to work similar to the example below, which
simply contains different Japanese characters in the table name. Running the
following SQL will complete successfully:
====
create user viewer1;

create table lodging_宿泊
(id integer,
title varchar(40));

grant SELECT on table lodging_宿泊 to viewer1;

SELECT has_table_privilege('viewer1', 'lodging_宿泊', 'select');
====

4) The result is as follow:
====
t
====

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pistole 2017-05-19 16:46:53 BUG #14663: Unexpected rounding changes for money type divided by bigint
Previous Message Anthony Sotolongo 2017-05-19 15:51:06 Re: BUG #14661: authentication behavior(SCRAM-MD5)