From: | Robert Forsman <thoth(at)purplefrog(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | freaky results |
Date: | 2001-06-12 15:37:37 |
Message-ID: | 200106121537.LAA02772@nile.purplefrog.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Running postgres-7.0.3 on a RedHat 6.2 system:
Recently I updated the schema of one of our tables (create, insert
select, drop, rename). We have a boolean column "hitsingle" with a default
of 'f'.
media=> \d incantaaudioclipregistry
Table "incantaaudioclipregistry"
Attribute | Type | Modifier
----------------+--------------+----------------------
...
releasedate | integer | not null
...
hitsingle | boolean | not null default 'f'
...
Lately newly inserted rows have been coming up with a value of 't', even
though that column is not mentioned in the insert (and therefore should get
the default value).
media=> select releasedate, hitsingle, count(*) from incantaaudioclipregistry group by releasedate, hitsingle;
releasedate | hitsingle | count
-------------+-----------+-------
...
1237 | f | 1984
1237 | t | 31
1237 | t | 429
1239 | f | 264
1239 | t | 26
1239 | t | 669
...
WTF is that?!
media=> select count(*) from incantaaudioclipregistry where hitsingle and not hitsingle = 't';
count
-------
1098
(1 row)
So, I have T and no T!
I tried replicating the problem on a small scale and couldn't. I can't
even replicate it in the database with problems. Sigh.
I have made copies of the files in base/media/ just in case somebody out
there could perform a forensic analysis.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-12 15:56:12 | Re: Patch to include PAM support... |
Previous Message | Bruce Momjian | 2001-06-12 15:21:16 | Re: Australian timezone configure option |