alter table bug???

From: Terry Mackintosh <terry(at)terrym(dot)com>
To: PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: alter table bug???
Date: 1998-12-11 14:25:34
Message-ID: Pine.LNX.3.95.981211090539.19396A-100000@terry1.acun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)terrym(dot)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!

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Terry Mackintosh 1998-12-11 14:42:54 Inclusion of spi mod. date. function?
Previous Message Maarten Boekhold 1998-12-11 14:24:57 RE: [HACKERS] JOIN syntax. Examples?