pg_dump data in BKI format

Started by Zdenek Kotalaover 19 years ago4 messages
#1Zdenek Kotala
Zdenek.Kotala@Sun.COM

I'm playing with catalog upgrade via BKI format. I enhanced the pg_dump
of BKI output (not patch ready yet). I'm using it for some test now, but
I think It should be useful for some one other, for example some
application with embedded postgres should use own prepared BKI for
database init (with small enhancement in bootstrap mode) and this option
should help to prepare a BKI script from application template database.

Let me know your meaning about integration this enhancement into the
pg_dump.

Thanks Zdenek

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Zdenek Kotala (#1)
Re: pg_dump data in BKI format

Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:

I'm playing with catalog upgrade via BKI format. I enhanced the pg_dump
of BKI output (not patch ready yet). I'm using it for some test now, but
I think It should be useful for some one other, for example some
application with embedded postgres should use own prepared BKI for
database init (with small enhancement in bootstrap mode) and this option
should help to prepare a BKI script from application template database.

This seems utterly useless :-(

The BKI file format was never designed to be general purpose --- as an
example, I do not believe it can cope with quotes or newlines embedded
in data values. So as a target for pg_dump it's quite unsatisfactory.

Nor do I see a particularly good reason why add-ons would need to get
into the catalogs at the bootstrap stage, rather than using more
conventional, much easier-to-use SQL commands to add objects later
during initdb. So "let's improve BKI" sounds like an exercise in
time-wasting, also.

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Zdenek Kotala (#1)
Re: pg_dump data in BKI format

Zdenek Kotala wrote:

I'm playing with catalog upgrade via BKI format. I enhanced the
pg_dump of BKI output (not patch ready yet). I'm using it for some
test now, but I think It should be useful for some one other, for
example some application with embedded postgres should use own
prepared BKI for database init (with small enhancement in bootstrap
mode) and this option should help to prepare a BKI script from
application template database.

Let me know your meaning about integration this enhancement into the
pg_dump.

I am not clear how this is an enhancement. The BKI file is a purely
internal bootstrap mechanism, and I do not see any good reason to make
pg_dump have any knowledge of it at all. pg_dump is already horribly
complex (of necessity, to some extent, because it has to embody
knowledge of previous releases). Anything that increases the complexity
is to be avoided.

In any case, surely the whole point about upgrading would be to do it
without bootstrapping a new location.

cheers

andrew

#4Zdenek Kotala
Zdenek.Kotala@Sun.COM
In reply to: Tom Lane (#2)
Re: pg_dump data in BKI format

Tom Lane wrote:

Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:

I'm playing with catalog upgrade via BKI format. I enhanced the pg_dump
of BKI output (not patch ready yet). I'm using it for some test now, but
I think It should be useful for some one other, for example some
application with embedded postgres should use own prepared BKI for
database init (with small enhancement in bootstrap mode) and this option
should help to prepare a BKI script from application template database.

This seems utterly useless :-(

The BKI file format was never designed to be general purpose --- as an
example, I do not believe it can cope with quotes or newlines embedded
in data values. So as a target for pg_dump it's quite unsatisfactory.

"\n" works fine for new line, but you have right that there should be
more dangerous characters.

Nor do I see a particularly good reason why add-ons would need to get
into the catalogs at the bootstrap stage, rather than using more
conventional, much easier-to-use SQL commands to add objects later
during initdb.

Yes, You have right, It is much better.

So "let's improve BKI" sounds like an exercise in
time-wasting, also.

Yes, I agree with you. Thanks for the answer.

Zdenek