alter table bug???

Поиск
Список
Период
Сортировка
От Terry Mackintosh
Тема alter table bug???
Дата
Msg-id Pine.LNX.3.95.981211090539.19396A-100000@terry1.acun.com
обсуждение исходный текст
Ответы Re: [HACKERS] alter table bug???  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Hi all

6.4 release version on RedHat 4.2 w/ many upgrades including flex.

Check this out, the 'password' field was an after thought, and was added
using the alter table command:
Also, I found a spelling error in a field name, so ran these two commands
in this order:

alter table listings rename lanme to lname;

alter table listings add column password char(10);

All seemed fine untill the project got to the point where password came
into use:

lse=> \d listings

Table    = listings
+------------------------+----------------------------------+-------+
|         Field          |              Type                | Length|
+------------------------+----------------------------------+-------+
| title                  | char() not null                  |    30 |
| discription            | char() not null                  |   150 |
| url                    | char() not null                  |   100 |
| lname                  | char() not null                  |    20 |
| fname                  | char() not null                  |    20 |
| email                  | char() not null                  |   100 |
| ent_date               | datetime not null default dateti |     8 |
| mod_date               | datetime not null default dateti |     8 |
| approved               | bool not null default 'False'    |     1 |
| item_id                | int4 not null default nextval (  |     4 |
| password               | char()                           |    10 |
+------------------------+----------------------------------+-------+
Indices:  listings_pkey         listings_url_key
lse=> select * from listings where password = '093b7a6b';
ERROR:  RestrictionClauseSelectivity: bad value 2.164003
lse=> select password from listings where item_id = 1;
password
----------
093b7a6b
(1 row)

lse=>

Any ideas what that is all about?

Thanks, have a great day
Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
sysadmin/owner  Please! No MIME encoded or HTML mail, unless needed.

Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.4
-------------------------------------------------------------------
Success Is A Choice ... book by Rick Patino, get it, read it!



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

Предыдущее
От: Dan Gowin
Дата:
Сообщение: RE: [HACKERS] libpq and libpgtcl in Windows
Следующее
От: "Maarten Boekhold"
Дата:
Сообщение: RE: [HACKERS] JOIN syntax. Examples?