Unix Technical Forum

BUG #1659: primary key accepts null value

This is a discussion on BUG #1659: primary key accepts null value within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1659 Logged by: İbrahim Email address: ibrahimbayer@gmail.com PostgreSQL version: 8.0.2 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:50 AM
İbrahim
 
Posts: n/a
Default BUG #1659: primary key accepts null value


The following bug has been logged online:

Bug reference: 1659
Logged by: İbrahim
Email address: ibrahimbayer@gmail.com
PostgreSQL version: 8.0.2
Operating system: Windows XP sp1
Description: primary key accepts null value
Details:

i m using pg 8.0.2 in a project with Visual Studio.NET at Windows Platform
but when i send a null value to my Prmary Key column it accepts that value.
I think it is a hard problem and i cant delete the null valued primary key
column by PgAdmin3 can you help me about this? Thanks İbrahim BAYER
Computer Engineer

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 08:50 AM
Ezequiel Tolnay
 
Posts: n/a
Default Re: BUG #1659: primary key accepts null value

İbrahim wrote:
> The following bug has been logged online:
>
> Bug reference: 1659
> Logged by: İbrahim
> Email address: ibrahimbayer@gmail.com
> PostgreSQL version: 8.0.2
> Operating system: Windows XP sp1
> Description: primary key accepts null value
> Details:
>
> i m using pg 8.0.2 in a project with Visual Studio.NET at Windows Platform
> but when i send a null value to my Prmary Key column it accepts that value.
> I think it is a hard problem and i cant delete the null valued primary key
> column by PgAdmin3 can you help me about this? Thanks İbrahim BAYER
> Computer Engineer


Please include a reproducible example, otherwise you cannot expect
anyone to help you.

Regards,

Ezequiel Tolnay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 08:50 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1659: primary key accepts null value

On Wed, May 11, 2005 at 01:36:00PM +0100, İbrahim wrote:
>
> i m using pg 8.0.2 in a project with Visual Studio.NET at Windows Platform
> but when i send a null value to my Prmary Key column it accepts that value.


PRIMARY KEY implies NOT NULL. Are you sure the value being inserted
is NULL and not, for example, an empty string? What's the output of
the following query (use your own table and column names)?

SELECT pkcolumn, length(pkcolumn), pkcolumn IS NULL FROM tablename;

Are you sure the column has a PRIMARY KEY constraint? If you connect
with psql, what's the output of the following command?

\d tablename

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:39 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com