Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()

Поиск
Список
Период
Сортировка
От Christian Kruse
Тема Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
Дата
Msg-id 20140128155722.GD24091@defunct.ch
обсуждение исходный текст
Ответ на Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Christian Kruse <christian@2ndQuadrant.com>)
Список pgsql-hackers
Hi,

when I remove the errno comparison and use a 1 it works:

ereport(FATAL,(errmsg("could not map anonymous shared memory: %m"), 1 ? errhint("This error usually means that
PostgreSQL'srequest "         "for a shared memory segment exceeded available memory "         "or swap space. To
reducethe request size (currently "         "%zu bytes), reduce PostgreSQL's shared memory usage, "         "perhaps by
reducingshared_buffers or "         "max_connections.",         *size) : 0)); 

Same if I use an if(errno == ENOMEM) instead of the ternary operator.

Best regards,

-- Christian Kruse               http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: proposal: hide application_name from other users
Следующее
От: Tom Lane
Дата:
Сообщение: Re: alternative back-end block formats