Re: pg_dump --comment?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Jon Jensen <jon(at)endpoint(dot)com>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Chris Campbell <chris(at)bignerdranch(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump --comment?
Date: 2004-05-28 15:58:46
Message-ID: 6.1.1.1.0.20040529014930.053e0a48@203.8.195.10
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

At 12:15 AM 29/05/2004, Jon Jensen wrote:
>However, I would like to see an option to include the timestamp if someone
>wants it.

The timestamp is already in the header for custom dumps. Have a look at the
first few lines from a 'pg_restore -l'.

In terms of general comments, there is already a 'WARNING' type TOC entry
for custom dumps. This emits a warning message when pg_restore is called.

A similar mechanism could be used to dump SQL comments. eg. new TOC type of
'SQL_COMMENT' with a defn starting with '--' would work with old & new
pg_dump versions. It might be a good idea to investigate the likely uses
for these comments, since the TOC entries may be suppressed depending on
whether they are deemed to be part of the schema or the data. Once the
modes of use are defined, a better mechanism may become apparent.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp.mit.edu:11371 |/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message pgsql 2004-05-28 16:16:56 Re: tablespaces and DB administration
Previous Message Marty Scholes 2004-05-28 15:52:13 Re: tablespaces and DB administration

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-05-28 16:52:03 Re: Link errors on win32
Previous Message Tom Lane 2004-05-28 15:16:53 Re: postmaster.c doesn't compile on win32