pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedNull values where they should not be...HELP Please!!
4+ messages / 3 participants
[nested] [flat]
* Null values where they should not be...HELP Please!!
@ 2000-10-03 20:25 Sanjay Arora <sk@pobx.com>
0 siblings, 1 reply; 4+ messages in thread
From: Sanjay Arora @ 2000-10-03 20:25 UTC (permalink / raw)
To: pgsql-interfaces; +Cc: goga@tc-internet.com; arminder@tc-internet.com
I am using postgreSQL v. 7.0.2 on RH Linux 6.2 on the server with VB6
Application accessing the DB through postgrSQL ODBC driver v. 6.50.
We have been running one application for a few months now and everything
seemed to be fine and dandy. We are now exploring PG 7.1 and in the process
of dumping the data for upload to 7.1 for testing, we found something very
strange.
- One Table has its default value as false, and has a constraint that it
can't b null, still there are a lot of values that are NULL.
- A serial field supposed to be "not null" also has a lot of nulls.
- boolean fields with default values specified have nulls.
Assuming even that the application is trying to store null where it should
not, PG should raise an error, instead of accepting the same. Anyone
encountered this before? Where should I look for a fix to this particular
problem while we are testing PG 7.1
My thanks in Advance
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Null values where they should not be...HELP Please!!
@ 2001-05-03 19:36 Tom Lane <tgl@sss.pgh.pa.us>
parent: Sanjay Arora <sk@pobx.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2001-05-03 19:36 UTC (permalink / raw)
To: Sanjay Arora <sk@pobx.com>; +Cc: pgsql-interfaces; goga@tc-internet.com; arminder@tc-internet.com
Sanjay Arora <sk@pobx.com> writes:
> Assuming even that the application is trying to store null where it should
> not, PG should raise an error, instead of accepting the same.
Indeed. No one has reported any such problem before, AFAIR. Are you
sure the columns are marked NOT NULL?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Null values where they should not be...HELP Please!!
@ 2001-05-03 23:11 Stephen Davies <scldad@sdc.com.au>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Davies @ 2001-05-03 23:11 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Sanjay Arora <sk@pobx.com>; pgsql-interfaces; goga@tc-internet.com; arminder@tc-internet.com
This looks a bit like the problem that I raised a few weeks ago.
It seems that either ODBC or MSAccess or (more likely) VB knows a way to
insert records containing nothing but nulls.
I changed my DDL to make the unique (sequence-based) keys on the tables
involved "not null". This sees to have stopped the inserts but has not
caused any error messages.
The database is only acessed via VB and Access. There is no user use of
psql.
Cheers,
Stephen Davies
On Thu, 03 May 2001 15:36:03 -0400, Tom Lane said:
> Sanjay Arora <sk@pobx.com> writes:
> > Assuming even that the application is trying to store null where it should
> > not, PG should raise an error, instead of accepting the same.
>
> Indeed. No one has reported any such problem before, AFAIR. Are you
> sure the columns are marked NOT NULL?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
========================================================================
Stephen Davies Consulting scldad@sdc.com.au
Adelaide, South Australia. Voice: 08-8177 1595
Computing & Network solutions. Fax: 08-8177 0133
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Null values where they should not be...HELP Please!!
@ 2001-05-03 23:14 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stephen Davies <scldad@sdc.com.au>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2001-05-03 23:14 UTC (permalink / raw)
To: Stephen Davies <scldad@sdc.com.au>; +Cc: Sanjay Arora <sk@pobx.com>; pgsql-interfaces; goga@tc-internet.com; arminder@tc-internet.com
Stephen Davies <scldad@sdc.com.au> writes:
> I changed my DDL to make the unique (sequence-based) keys on the tables
> involved "not null". This sees to have stopped the inserts but has not
> caused any error messages.
Are you looking for error messages in the postmaster log, or are you
just believing what Microsoft software tells you?
Running the postmaster with query logging enabled (-d2 postmaster
switch) would be even more helpful, since then we could see what these
mysterious queries are ...
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-05-03 23:14 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-03 20:25 Null values where they should not be...HELP Please!! Sanjay Arora <sk@pobx.com>
2001-05-03 19:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-03 23:11 ` Stephen Davies <scldad@sdc.com.au>
2001-05-03 23:14 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox