Matthew Whittaker-Williams m.whittaker-williams
Tue May 30 08:54:07 PDT 2006
On Tuesday 30 May 2006 17:01, Jan Wieck wrote:
> On 5/30/2006 7:14 AM, Matthew Whittaker-Williams wrote:
> > On Tuesday 30 May 2006 13:11, Matthew Whittaker-Williams wrote:
> >> Hi,
> >>
> >> I was wondering if it is possible to define multiple primary keys in the
> >> set add table function.
> >>
> >> Like so:
> >>
> >> set add table ( set id = 1, origin = 1, id = 54, full qualified name
> >> = 'public,foo_map, key = 'foo1,foo2', comment = 'Table foo_map');
> >
> > Whoops..
> >
> > Should be this:
> >
> >  set add table ( set id = 1, origin = 1, id = 54, full qualified name
> > = 'public,foo_map', key = 'foo1,foo2', comment = 'Table foo_map');
>
> Since the key used for Slony-I must be unique and not-null, specifying
> multiple keys is totally pointless.

Yea I totally agree..
>
> Are you eventually mixing up multi-column keys with multiple keys? You
> don't specify the column names but rather the index name in the SET ADD
> TABLE command. If that happens to be a unique index over multiple
> not-null columns, no problem.
>
Nah, these are primary keys for tables, it astonishes me too that they made it 
this way.
They also lack the use of UNIQUE keys or either by the new function SERIAL for 
auto increment.

>
> Jan
>
> > Matthew

Thanks for the reply.

I`ve asked my customer to rewrite his sql code so it can fit more into slony-I 
replication setup.

With kind regards

Matthew
-- 
Unix system & Network Engineer
Internet Unie Services B.V.
Postbus 23667
1100 ED  AMSTERDAM
Tel: +31(0)20 463 0506
Fax: +31(0)20 463 2146
Email: m.whittaker-williams at iu.nl
URL: http://iu.nl
PGP: 0x08A909D0
Ripe nic-handle: MW2861-RIPE



More information about the Slony1-general mailing list