Bug(s) or not?

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug(s) or not?
Date: 2003-05-26 10:17:52
Message-ID: 3ED1E9D0.6080706@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Simple test suite for current CVS:
%initdb ...
%createdb q
%psql q
q=# select * from pg_class limit 1;
SELECT
q=# select * from pg_class limit 2;
server sent data ("D" message) without prior row description ("T" message)
SELECT
q=# select * from pg_class limit 3;
server sent data ("D" message) without prior row description ("T" message)
server sent data ("D" message) without prior row description ("T" message)
SELECT

Why can I select from pg_class? Other system tables are working properly...

And one more:
q=# create table q(i int);
CREATE TABLE
q=# insert into q values (1);
INSERT 17450 1
q=# insert into q values (2);
INSERT 17451 1

q=# select count(*) from q;
count
-------
2
(1 row)

q=# select count(*) from q limit 1;
count
-------
2
(1 row)

q=# select count(*) from q limit 1 offset 1;
count
-------
(0 rows)

q=# select count(*) from q offset 1;
count
-------
(0 rows)

q=# select count(*) from q offset 0;
count
-------
2
(1 row)

I understand that it isn't correct query, but why pgsql do something strange
instead of say 'error'?

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2003-05-26 11:29:25 Re: Bug(s) or not?
Previous Message Rajesh Kumar Mallah 2003-05-26 09:24:13 slow \d commands.