Thread: Schema backup failure
We've found a problem backing up some of our schemas from pgAdmin4. After some investigation, we've found the problem being the schema names need ident quoting - apparently because they contain capital letters.
For example, pgAdmin generated this code which fails:
For example, pgAdmin generated this code which fails:
$ /usr/bin/pg_dump --file "testera" --host "/var/run/postgresql" --port "5432" --username "postgres" --no-password --verbose --format=c --blobs --schema "HR00000000001-2019" "nubes"However, if I quote the schema name by adding a pair of single quotes...
pg_dump: last built-in OID is 16383
pg_dump: no matching schemas were found
$ /usr/bin/pg_dump --file "testera" --host "/var/run/postgresql" --port "5432" --username "postgres" --no-password --verbose --format=c --blobs --schema '"HR00000000001-2019"' "nubes"...it works fine. So it seems schema names should be automatically quoted (similar to quote_ident()) for backup to work properly. I guess this is a bug in pgAdmin4 (version I have is 4.11).
pg_dump: last built-in OID is 16383
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
...
--
Srdačan pozdrav / Kind regards
-----------------------------------------------
Arni Kromić
[ IT system engineer ]
arni.kromic@bios-ict.hr
Tel: +385 21 490 599
Mob: +385 95 659 5 659
----------------------------------------------
![](http://bios-ict.hr/dl/bios_ict.jpg)
Mažuranićevo šet. 14
21000 Split, Croatia
Tel: +385 21 344 349
Fax: +358 21 490 599
http://podrska.bios-ict.hr
http://www.bios-ict.hr
----------------------------------------------
Srdačan pozdrav / Kind regards
-----------------------------------------------
Arni Kromić
[ IT system engineer ]
arni.kromic@bios-ict.hr
Tel: +385 21 490 599
Mob: +385 95 659 5 659
----------------------------------------------
![](http://bios-ict.hr/dl/bios_ict.jpg)
Mažuranićevo šet. 14
21000 Split, Croatia
Tel: +385 21 344 349
Fax: +358 21 490 599
http://podrska.bios-ict.hr
http://www.bios-ict.hr
----------------------------------------------
Hi Arni,
Seems like a bug, kindly raise a bug here - https://redmine.postgresql.org/projects/pgadmin4/issues/new
On Fri, Aug 9, 2019 at 3:26 PM Arni Kromić <Arni.Kromic@bios-ict.hr> wrote:
We've found a problem backing up some of our schemas from pgAdmin4. After some investigation, we've found the problem being the schema names need ident quoting - apparently because they contain capital letters.
For example, pgAdmin generated this code which fails:$ /usr/bin/pg_dump --file "testera" --host "/var/run/postgresql" --port "5432" --username "postgres" --no-password --verbose --format=c --blobs --schema "HR00000000001-2019" "nubes"However, if I quote the schema name by adding a pair of single quotes...
pg_dump: last built-in OID is 16383
pg_dump: no matching schemas were found$ /usr/bin/pg_dump --file "testera" --host "/var/run/postgresql" --port "5432" --username "postgres" --no-password --verbose --format=c --blobs --schema '"HR00000000001-2019"' "nubes"...it works fine. So it seems schema names should be automatically quoted (similar to quote_ident()) for backup to work properly. I guess this is a bug in pgAdmin4 (version I have is 4.11).
pg_dump: last built-in OID is 16383
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
...--
Srdačan pozdrav / Kind regards
-----------------------------------------------
Arni Kromić
[ IT system engineer ]
arni.kromic@bios-ict.hr
Tel: +385 21 490 599
Mob: +385 95 659 5 659
----------------------------------------------
Mažuranićevo šet. 14
21000 Split, Croatia
Tel: +385 21 344 349
Fax: +358 21 490 599
http://podrska.bios-ict.hr
http://www.bios-ict.hr
----------------------------------------------
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
On 09/08/2019 12.00, Aditya Toshniwal wrote:
Hello!Hi Arni,
Here it is: https://redmine.postgresql.org/issues/4590Seems like a bug, kindly raise a bug here - https://redmine.postgresql.org/projects/pgadmin4/issues/new
--
Kind Regards,
Arni Kromic