public inbox for [email protected]  
help / color / mirror / Atom feed
pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8""
3+ messages / 2 participants
[nested] [flat]

* pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8""
@ 2017-01-18 15:45  Bhanu Gandikota <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Bhanu Gandikota @ 2017-01-18 15:45 UTC (permalink / raw)
  To: pgadmin-hackers

Getting following error in PostgreSQL 9.6.1 DB logs when I tried to view “Scripts=>CREATE Script” on a table in PgAdmin4.1.1 Browser.
PostgreSQL DB has been recently upgraded from version 9.3.9 to 9.6.1 using pg_upgrade utility.

The same browser function worked just fine when pgadmin3 was pointing to PostgreSQL 9.3.9 database (before upgrade).


2017-01-18 07:34:43.364 PST,"user","QA961",5423,"x.x.x.x:64624",587f99b8.152f,4,"idle",2017-01-18 07:24:40 PST,2/92094,0,ERROR,22021,"invalid byte sequence for encoding ""UTF8"": 0x00",,,,,,"
SELECT t.oid,t.tgname AS name, t.xmin, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
    nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
    COALESCE(substring(pg_get_triggerdef(t.oid), 'WHEN (.*) EXECUTE PROCEDURE'),
    substring(pg_get_triggerdef(t.oid), 'WHEN (.*)  \\$trigger')) AS whenclause,
    -- We need to convert tgargs column bytea datatype to array datatype
    (string_to_array(encode(tgargs, 'escape'), '\000')::text[])[1:tgnargs] AS tgargs,
    (CASE WHEN t.oid <= 13321::oid THEN true ElSE false END) AS is_sys_trigger,
    (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constarint,
    (CASE WHEN tgenabled = 'O' THEN true ElSE false END) AS is_enable_trigger
FROM pg_trigger t
    JOIN pg_class cl ON cl.oid=tgrelid
    JOIN pg_namespace na ON na.oid=relnamespace
    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
WHERE NOT tgisinternal
    AND tgrelid = 17452::OID
    AND t.oid = 18252::OID
ORDER BY tgname;",,,"pgAdmin 4 - DB:QA961"


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8""
@ 2017-01-19 05:27  Murtuza Zabuawala <[email protected]>
  parent: Bhanu Gandikota <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Murtuza Zabuawala @ 2017-01-19 05:27 UTC (permalink / raw)
  To: Bhanu Gandikota <[email protected]>; +Cc: pgadmin-hackers

Hi,

Can you run & provide output offollowing sql queries from pgAdmin4?

   - SHOW SERVER_ENCODING;
   - SHOW CLIENT_ENCODING;


And what is the encoding set for your current database connection on which
you are trying to run query (Right click on your database, click on
Properties > Definition Tab > Check Encoding, Collation & Character type) ?


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Wed, Jan 18, 2017 at 9:15 PM, Bhanu Gandikota <[email protected]>
wrote:

> Getting following error in PostgreSQL 9.6.1 DB logs when I tried to view “*Scripts=>CREATE
> Script*” on a table in PgAdmin4.1.1 Browser.
>
> PostgreSQL DB has been recently upgraded from version 9.3.9 to 9.6.1 using
> pg_upgrade utility.
>
>
>
> The same browser function worked just fine when pgadmin3 was pointing to
> PostgreSQL 9.3.9 database (before upgrade).
>
>
>
>
>
> 2017-01-18 07:34:43.364 PST,"user","QA961",5423,"x.x.
> x.x:64624",587f99b8.152f,4,"idle",2017-01-18 07:24:40 PST,2/92094,0,*ERROR,22021,"invalid
> byte sequence for encoding ""UTF8"": 0x00",,,,,,"*
>
> SELECT t.oid,t.tgname AS name, t.xmin, t.*, relname, CASE WHEN relkind =
> 'r' THEN TRUE ELSE FALSE END AS parentistable,
>
>     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
>
>     COALESCE(substring(pg_get_triggerdef(t.oid), 'WHEN (.*) EXECUTE
> PROCEDURE'),
>
>     substring(pg_get_triggerdef(t.oid), 'WHEN (.*)  \\$trigger')) AS
> whenclause,
>
>     -- We need to convert tgargs column bytea datatype to array datatype
>
>     (string_to_array(encode(tgargs, 'escape'),
> '\000')::text[])[1:tgnargs] AS tgargs,
>
>     (CASE WHEN t.oid <= 13321::oid THEN true ElSE false END) AS
> is_sys_trigger,
>
>     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS
> is_constarint,
>
>     (CASE WHEN tgenabled = 'O' THEN true ElSE false END) AS
> is_enable_trigger
>
> FROM pg_trigger t
>
>     JOIN pg_class cl ON cl.oid=tgrelid
>
>     JOIN pg_namespace na ON na.oid=relnamespace
>
>     LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND
> des.classoid='pg_trigger'::regclass)
>
>     LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
>
>     LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
>
> WHERE NOT tgisinternal
>
>     AND tgrelid = 17452::OID
>
>     AND t.oid = 18252::OID
>
> ORDER BY tgname;",,,"pgAdmin 4 - DB:QA961"
>


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8""
@ 2017-01-19 15:49  Bhanu Gandikota <[email protected]>
  parent: Murtuza Zabuawala <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Bhanu Gandikota @ 2017-01-19 15:49 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers

Server_encoding: UTF8
Client_encoding: UNICODE

Encoding: UTF8
Collation: en_US.UTF-8
Character type: en_US.UTF-8

From: Murtuza Zabuawala <[email protected]>
Date: Thursday, January 19, 2017 at 12:27 AM
To: Bhanu Gandikota <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [pgadmin-hackers] pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8""


  *   SHOW SERVER_ENCODING;
  *   SHOW CLIENT_ENCODING;


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2017-01-19 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 15:45 pgadmin4.1.1 ERROR,22021,"invalid byte sequence for encoding ""UTF8"" Bhanu Gandikota <[email protected]>
2017-01-19 05:27 ` Murtuza Zabuawala <[email protected]>
2017-01-19 15:49   ` Bhanu Gandikota <[email protected]>

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