pg_restore -l with a directory archive

Lists: pgsql-hackers
From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_restore -l with a directory archive
Date: 2013-06-14 16:40:53
Message-ID: CAHGQGwGD=-JkcqYnpY0=aHDvq0Vy_JkOUUt-ofJiNKQFJ2TjVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

When I ran pg_restore -l with the directory arhicve input, I found that
its format is wrongly reported as UNKNOWN.

$ pg_dump -F d -f hoge
$ pg_restore -l hoge
;
; Archive created at Sat Jun 15 01:38:14 2013
; dbname: postgres
; TOC Entries: 9
; Compression: -1
; Dump Version: 1.12-0
; Format: UNKNOWN
; Integer: 4 bytes
; Offset: 8 bytes
; Dumped from database version: 9.3beta1
; Dumped by pg_dump version: 9.3beta1
;
;
; Selected TOC Entries:

In this case, the format should be reported as DIRECTORY.
The attached patch fixes this problem.

Regards,

--
Fujii Masao

Attachment Content-Type Size
pg_restore_tocsummary_v1.patch application/octet-stream 362 bytes

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_restore -l with a directory archive
Date: 2013-06-15 20:21:26
Message-ID: CAHGQGwF1fkdiq9=YoJpOgzrPtV+d-tMtY2BRNGHtf0_W9uC+6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jun 15, 2013 at 1:40 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Hi,
>
> When I ran pg_restore -l with the directory arhicve input, I found that
> its format is wrongly reported as UNKNOWN.
>
> $ pg_dump -F d -f hoge
> $ pg_restore -l hoge
> ;
> ; Archive created at Sat Jun 15 01:38:14 2013
> ; dbname: postgres
> ; TOC Entries: 9
> ; Compression: -1
> ; Dump Version: 1.12-0
> ; Format: UNKNOWN
> ; Integer: 4 bytes
> ; Offset: 8 bytes
> ; Dumped from database version: 9.3beta1
> ; Dumped by pg_dump version: 9.3beta1
> ;
> ;
> ; Selected TOC Entries:
>
>
> In this case, the format should be reported as DIRECTORY.
> The attached patch fixes this problem.

Committed.

Regards,

--
Fujii Masao