mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Provide Assert() for frontend code.
Per discussion on-hackers. psql is converted to use the new code. Follows a suggestion from Heikki Linnakangas.
This commit is contained in:
@@ -24,4 +24,16 @@
|
||||
|
||||
#include "c.h"
|
||||
|
||||
/*
|
||||
* Assert() can be used in both frontend and backend code. In frontend code it
|
||||
* just calls the standard assert, if it's available. If use of assertions is
|
||||
* not configured, it does nothing.
|
||||
*/
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
#include <assert.h>
|
||||
#define Assert(p) assert(p)
|
||||
#else
|
||||
#define Assert(p)
|
||||
#endif
|
||||
|
||||
#endif /* POSTGRES_FE_H */
|
||||
|
Reference in New Issue
Block a user