Re: [SQL] primary keys as TEXT

2006-07-31 Thread Aaron Bono
On 7/31/06, Manlio Perillo <[EMAIL PROTECTED]> wrote: Because serial ids are only surrogate keys.My tables have well definited primary keys, the only problem is thatthey are of type TEXT (and spawn up to 3 columns).My concern is: how bad can be performance?  My guess is that the performance differe

Re: [SQL] primary keys as TEXT

2006-07-31 Thread Manlio Perillo
Aaron Bono ha scritto: > On 7/28/06, *Manlio Perillo* <[EMAIL PROTECTED] > > wrote: > > Michael Glaesemann ha scritto: > > > > On Jul 28, 2006, at 17:37 , Manlio Perillo wrote: > > > >> There can be performancs problems in having primary keys of type >

Re: [SQL] primary keys as TEXT

2006-07-30 Thread Aaron Bono
On 7/28/06, Manlio Perillo <[EMAIL PROTECTED]> wrote: Michael Glaesemann ha scritto:>> On Jul 28, 2006, at 17:37 , Manlio Perillo wrote:>>> There can be performancs problems in having primary keys of type TEXT?>> What about having a primary key of 3 columns (all of type TEXT)? >> What defines a pro

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Manlio Perillo
Michael Glaesemann ha scritto: > > On Jul 28, 2006, at 17:37 , Manlio Perillo wrote: > >> There can be performancs problems in having primary keys of type TEXT? >> What about having a primary key of 3 columns (all of type TEXT)? > > What defines a problem in terms of performance is heavily depen

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Scott Marlowe
On Fri, 2006-07-28 at 03:37, Manlio Perillo wrote: > Hi. > > There can be performancs problems in having primary keys of type TEXT? > What about having a primary key of 3 columns (all of type TEXT)? The biggest problem with using text as a primary key or foreign key is that text types are locale

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Aaron Bono
On 7/28/06, Manlio Perillo <[EMAIL PROTECTED]> wrote: Hi.There can be performancs problems in having primary keys of type TEXT?What about having a primary key of 3 columns (all of type TEXT)? If you are really worried about it, why not just use surrogate keys?  They are very easy to use.  Then your

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Michael Glaesemann
On Jul 28, 2006, at 17:37 , Manlio Perillo wrote: There can be performancs problems in having primary keys of type TEXT? What about having a primary key of 3 columns (all of type TEXT)? What defines a problem in terms of performance is heavily dependent on your particular needs and requirem

[SQL] primary keys as TEXT

2006-07-28 Thread Manlio Perillo
Hi. There can be performancs problems in having primary keys of type TEXT? What about having a primary key of 3 columns (all of type TEXT)? Regards Manlio Perillo ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] primary keys

2002-11-07 Thread Tomasz Myrta
Uz.ytkownik Huub napisa?: > Hi, > > I want to create a table which has 2 columns, and both columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. Dependent on what you need: 1) you can create primary key bas

Re: [SQL] primary keys

2002-11-07 Thread Huub
>To: [EMAIL PROTECTED] >Subject: [SQL] primary keys > > >Hi, > >I want to create a table which has 2 columns, and both >columns have to >be primary key (or: together they are the primary key). How can I do >this using SQL? Using pgAdminII f

Re: [SQL] primary keys

2002-11-07 Thread Achilleus Mantzios
On Wed, 6 Nov 2002, Huub wrote: > Hi, > > I want to create a table which has 2 columns, and both columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. I dont know the way in pgAdminII, but from psql simpl

Re: [SQL] primary keys

2002-11-07 Thread Sangeetha Rao
'Huub'; [EMAIL PROTECTED] Subject: Re: [SQL] primary keys A table can only have ONE primary key. It can have additional indexes with a UNIQUE restriction, thereby forcing the second field to be as good as a primary key. That is probably what you are looking for, however, you can also in PG

Re: [SQL] primary keys

2002-11-07 Thread Bruno Wolff III
On Wed, Nov 06, 2002 at 15:18:38 +0100, Huub <[EMAIL PROTECTED]> wrote: > Hi, > > I want to create a table which has 2 columns, and both columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. You can u

Re: [SQL] primary keys

2002-11-07 Thread Rachel.Vaudron
Hi, For example you can do something like that: CREATE TABLE "try" ( "field1"TEXT NOT NULL, "field2"INT4 NOT NULL, "field3"TEXT, PRIMARY KEY (field1, field2)); ** [EMAIL PROTECTED] Laboratoire de prehistoire d

Re: [SQL] primary keys

2002-11-07 Thread terry
> Subject: [SQL] primary keys > > > Hi, > > I want to create a table which has 2 columns, and both > columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. > > Thanks &

[SQL] primary keys

2002-11-07 Thread Huub
Hi, I want to create a table which has 2 columns, and both columns have to be primary key (or: together they are the primary key). How can I do this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. Thanks Huub ---(end of broadcast)--- TIP 4