Jan Wieck JanWieck
Tue Jul 27 14:06:16 PDT 2004
On 7/27/2004 5:31 AM, Levasseur, Fabrice wrote:
> Hi,
> 
> Slony add a specific column with a "slony primary key" inside all tables.
> So you don't need to update your database.

This is wrong.

The primary key added by slony is only meant as an interims solution for 
tables that don't have a natural primary key. Using the real primary key 
for row identification is recommended and I encourage Herv? to prepare 
the DB schema in that direction.

Multi-column primary keys are supported and the given example in the 
original mail is perfectly fine.


Jan


> 
> Exemple:
>   ident   |   nom   | latitude | longitude | _Slony-I_test1_rowID
> ----------+---------+----------+-----------+----------------------
>  00000000 | POINT00 |          |           |     1000000000021188
>  00000001 | POINT01 |          |           |     1000000000021189
>  00000002 | POINT02 |          |           |     1000000000021190
>  00000003 | POINT03 |          |           |     1000000000021191
>  00000004 | POINT04 |          |           |     1000000000021192
>  00000005 | POINT05 |          |           |     1000000000021193
> 
> 
> Fabrice Levasseur
> **************************************************
> SIGMA Project
> EDS Answare
> www.eds.com / www.eds.fr
> **************************************************
> 
> -----Message d'origine-----
> De : slony1-general-bounces at gborg.postgresql.org
> [mailto:slony1-general-bounces at gborg.postgresql.org]De la part de Herv?
> Piedvache
> Envoy? : mardi 27 juillet 2004 11:08
> ? : slony1-general at gborg.postgresql.org
> Objet : [Slony1-general] Primary key with two columns ?
> 
> 
> Hi,
> 
> Just a small question, I'm working to update a database "to be" slony 
> compatible ... I know that all my tables wich need to be replicated need a 
> primary key ... but does Slony is able to manage a primary key with two 
> fields ?
> 
> Like this :
> alter table panel add primary key (idmember, panel_name);
> 
> Thanks per advance for the answer ...
> 
> Regards,


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list