Re: Primary Key Problems

Поиск
Список
Период
Сортировка
От Phill Kenoyer
Тема Re: Primary Key Problems
Дата
Msg-id 20011208040643.GD2913@c0de.net
обсуждение исходный текст
Ответ на Re: Primary Key Problems  (Ian Barwick <barwick@gmx.net>)
Ответы Re: Primary Key Problems  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Primary Key Problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
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 | used           |        60

I do a daily pg_dump of the database and the scheme I posted was from
that.  So the primary key is still active.

I just dont understand how I can have dups in the primary keys, unless
it is a bug.

|On 011207 18:51
|Ian Barwick (barwick@gmx.net) wrote the following...
|Are the duplicated values in "stock" and "inventory_type"
|genuinely identical? As they are both VARCHARs they could
|contain differing amounts of trailing spaces or other
|'invisible' characters which would not be obvious from the
|console, but would represent valid and unique values
|to the constraint checker. These could result from
|unfiltered input, such as from an HTML form.
|
|Also, does the primary key still exist?
|
|SELECT relname, relowner FROM pg_class WHERE relname='inventory_pkey'
|
|Ian Barwick
|

--
Reason: Did you pay the new Support Fee?
                                               _   |       _
                                              (_()(|('.|)('||.|()|`|(

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: Primary Key Problems
Следующее
От: "darthxiong@libero.it"
Дата:
Сообщение: table name as parameter in pl/psql