pg_restore -L reordering of the statements does not work

Поиск
Список
Период
Сортировка
От Aditya D
Тема pg_restore -L reordering of the statements does not work
Дата
Msg-id CAEATte6vgZr6d2abZo9_wxTarwQP3TC_NLpCKTDzWW4E4OB9cw@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_restore -L reordering of the statements does not work  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hi Team,

Does the reorder of the statements in the list file works? Please find the below example - 

pg_restore -h <<hostname>> -v -U epguser -L "C:\Users\Desktop\dumpfiles\single.list" -d ownersdb "C:\Users\Desktop\dumpfiles\single_list.dump"

The contents of the list file 
;
; Archive created at 2023-10-27 22:37:57
;     dbname: role_owners
;     TOC Entries: 10
;     Compression: -1
;     Dump Version: 1.14-0
;     Format: CUSTOM
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 11.18
;     Dumped by pg_dump version: 15.2
;
;
; Selected TOC Entries:
10; 2615 57086 SCHEMA - schema_roles user1
4232; 0 0 ACL - SCHEMA schema_roles user1
201; 1259 57087 TABLE schema_roles test_user1 user1
202; 1259 57090 TABLE schema_roles test_user2 user2

Problem Statement - The ACL command i.e. The grant statement gets called out at the end while performing pg_restore and the use case is to call it at the beginning. I believe even though the re-ordering is done the statements are executed using the "Internal Archive Id" while referring to the dump file.

Is there any way we can reorder the statements instead of commenting or deleting these statements?

Thanks & Regards,
Aditya D

В списке pgsql-admin по дате отправления:

Предыдущее
От: Loles
Дата:
Сообщение: Re: ORDER BY DESC and NULLS LAST by default
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: ORDER BY DESC and NULLS LAST by default