Re: IS NULL
От | David Link |
---|---|
Тема | Re: IS NULL |
Дата | |
Msg-id | 3BE97985.1320140F@soundscan.com обсуждение исходный текст |
Ответ на | IS NULL (David Link <dlink@soundscan.com>) |
Ответы |
Re: IS NULL
(Tom Lane <tgl@sss.pgh.pa.us>)
|
Список | pgsql-novice |
Tom Lane wrote: > > David Link <dlink@soundscan.com> writes: > > The data in my column was bogus and not of the form 'DDMMYYYY'. Sorry > > Tom, my mistake. Actually, it was of the form YYYY and it was causing > > the query to blow up with: > > > psql:show_title.sql:13: pqReadData() -- backend closed the channel > > unexpectedly. > > This is a bug. What version are you using? Could you supply > an exact example of a value that makes it crash? pg 7.0.3 (running on mandrake 8.0 / 2.4.3 kernal) Query 1 - All's Well: bobcat=# select upckey, upc, title, theatre_reldate, genre, subgenre from title where upckey = 77703; upckey | upc | title | theatre_reldate | genre | subgenre --------+--------------+------------+-----------------+-------+---------- 77703 | 339660005072 | HOLLOW MAN | 2000 | 944 | x (1 row) Queary 2 - Bogus date (garbage in, garbage out): bobcat=# select upckey, upc, title, to_char(to_date (theatre_reldate, 'DDMMYYYY '), 'DD Mon YYYY') from title where upckey = 77703; upckey | upc | title | to_char --------+--------------+--------------------------------+------------- 77703 | 339660005072 | HOLLOW MAN | 20 Dec 0002 (1 row) Query 3 - Add a column to query and get more bad data: bobcat=# select upckey, upc, title, to_char(to_date (theatre_reldate, 'DDMMYYYY '), 'DD Mon YYYY'), genre from title where upckey = 77703; upckey | upc | title | to_char | genre --------+--------------+--------------------------------+-------------+------- 77703 | 339660005072 | HOLLOW MAN | 20 Dec 0002 | ¨a (1 row) Query 4 - Add another column and it blows up: bobcat=# select upckey, upc, title, to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY'), genre, subgenre from title where upckey = 77703; pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !# After repeating the error once or twice, It then gives this error for this query and others involving this row: FATAL 1: Memory exhausted in AllocSetAlloc() pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Succeeded. Scared, I shutdown the database and started it up again and it seems to be OK again. Thanks, David
В списке pgsql-novice по дате отправления: