Assert for frontend programs?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Assert for frontend programs?
Дата
Msg-id 50CB4553.9090407@dunslane.net
обсуждение исходный текст
Ответы Re: Assert for frontend programs?
Список pgsql-hackers
As I'm working through the parallel dump patch, I notice this in one of 
the header files:

#ifdef USE_ASSERT_CHECKING
#define Assert(condition) \    if (!(condition)) \    { \        write_msg(NULL, "Failed assertion in %s, line %d\n", \
                __FILE__, __LINE__); \        abort();\    }
 
#else
#define Assert(condition)
#endif


I'm wondering if we should have something like this centrally (e.g. in 
postgres_fe.h)? I can certainly see people wanting to be able to use 
Assert in frontend programs generally, and it makes sense to me not to 
make everyone roll their own.

cheers

andrew



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

Предыдущее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Multiple --table options for other commands
Следующее
От: Mikko Tiihonen
Дата:
Сообщение: Re: Use gcc built-in atomic inc/dec in lock.c