8.1 substring bug?

Поиск
Список
Период
Сортировка
От Harald Fuchs
Тема 8.1 substring bug?
Дата
Msg-id 87ek5n5mh0.fsf@srv.protecting.net
обсуждение исходный текст
Ответы Re: 8.1 substring bug?
Список pgsql-hackers
Consider the following:
 CREATE TEMP TABLE tbl (   id SERIAL NOT NULL,   PRIMARY KEY (id) );
 COPY tbl (id) FROM stdin; 1 2 3 4 \.
 SELECT substring ('1234567890' FOR (SELECT count (*) FROM tbl)::int);

This returns '1234', as expected.  But
 SELECT substring ('1234567890' FOR (SELECT count (*) FROM tbl));

returns NULL.  I think the problem is that "SELECT count(*)" returns a
BIGINT whereas "substring" expects an INT.  Shouldn't there be a warning? 



В списке pgsql-hackers по дате отправления: