[Bucardo-general] Multi-column PKey
Preston A. Elder
prez at goth.net
Mon Aug 18 20:15:28 UTC 2008
I noticed in the mailing list archive from a few months back you
mentioned multiple column primary key's was at the very top of your
Has there been any progress on this? I want to replicate a few
databases I have, but a number of them have multi-column primary keys,
and I don't want to have to modify my schemas (some of which are for
third-party applications) to add a single-field pkey for no other reason
than bucardo requires it.
If it's not done (or close to being so), can I use any of the following
to 'fake' a single-column primary key:
- A custom select?
- A view that displays a 'virtual' single-column primary key?
- An actual column that is UNIQUE NOT NULL and is updated by trigger
when the column is updated/inserted (the idea being that it is removed
when multi-column pkeys are supported)?
What is the recommended method for dealing with tables that have
multiple column pkeys, if you don't want to modify your schema.
Finally, it would be very convenient to be able to add all tables in a
database for replication in one fell swoop. To be honest, all that's
needed here is some kind of trigger that will, on a NULL being put as
the table name for a goat, will automatically select all tables in the
DB specified in the 'db' column, and then create N goats automatically,
and a herd with the name of the DB or something as part of the trigger
that fires anyway.
Not that this is a HUGE issue, but it's inconvenient to have to do N
number of inserts + create a hurd for each database I want to replicate
when I want to replicate the whole thing. Even if it's a one-off.
More information about the Bucardo-general