Re: [ADMIN] Primary Key Problems

2002-01-14 Thread Phill Kenoyer
I did have this problem in the past. I have a table with three fields set for the primary key. Somehow I would get dups in that table. I'm not sure how as I am too busy to test it. I changed my insert queries to check for existing data before the insert so I could get back to work. Someone di

Re: [ADMIN] Primary Key Problems

2002-01-14 Thread steve boyle
Tony / Phil, my 2c on the Primary Key definition / usage. If you have any SQL / DDL code that disagrees with the definitions below could you please repost them. "Tony Reina" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] (Phill Kenoyer) wro

Re: [ADMIN] Primary Key Problems

2001-12-28 Thread Tony Reina
[EMAIL PROTECTED] (Phill Kenoyer) wrote in message news:<[EMAIL PROTECTED]>... > Here is a good one. I have three fields set for my primary key. Now I > thought that a primary key was unique, and dups can not be inserted. > I don't think primary keys per se are unique, but rather can be made

Re: [ADMIN] Primary Key Problems

2001-12-18 Thread Tom Lane
Phill and Glen, We've just tracked down one mechanism that allows duplicate rows to be spawned --- see http://fts.postgresql.org/db/mw/msg.html?mid=1078374 and following discussion. In the example given by Brian Hirt, VACUUM's creation of a duplicate row causes a unique-key violation to be repor

Re: [ADMIN] Primary Key Problems

2001-12-10 Thread Stephan Szabo
On Fri, 7 Dec 2001, Phill Kenoyer wrote: > I took your advice and checked the string size using char_length() and > octet_length(). They are the same. > > octet_length | stock| octet_length | inventory_type | client_id > 5 | 10725 |4 | used |

Re: [ADMIN] Primary Key Problems

2001-12-07 Thread Phill Kenoyer
I took your advice and checked the string size using char_length() and octet_length(). They are the same. octet_length | stock| octet_length | inventory_type | client_id 5 | 10725 |4 | used |60 5 | 10725 |4 | use

Re: [ADMIN] Primary Key Problems

2001-12-07 Thread Ian Barwick
On Saturday 08 December 2001 02:44, Phill Kenoyer wrote: > Here is a good one. I have three fields set for my primary key. Now I > thought that a primary key was unique, and dups can not be inserted. That's the theory ;-) > CREATE TABLE "inventory" ( > "stock" character varying(50) NOT

[ADMIN] Primary Key Problems

2001-12-07 Thread Phill Kenoyer
Here is a good one. I have three fields set for my primary key. Now I thought that a primary key was unique, and dups can not be inserted. CREATE TABLE "inventory" ( "stock" character varying(50) NOT NULL, "inventory_type" character varying(20) DEFAULT 'unknown' NOT NULL,