diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-18 18:53:32 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-02-18 18:53:32 -0300 |
commit | a40d09e27fefbeca0d6994471b3e6965f1ac9dda (patch) | |
tree | fbc6c30436b03a3d7f8cb261144bedaf05c74e34 /src | |
parent | 187492b6c2e8cafc5b39063ca3b67846e8155d24 (diff) | |
download | postgresql-a40d09e27fefbeca0d6994471b3e6965f1ac9dda.tar.gz postgresql-a40d09e27fefbeca0d6994471b3e6965f1ac9dda.zip |
Move ExceptionalCondition back to postgres.h
It needs to be defined in the backend even when assertions are not
enabled. It's cleaner to put it back, than create a separate #ifdef
section in c.h.
Per trouble report from Jeff Janes
Diffstat (limited to 'src')
-rw-r--r-- | src/include/c.h | 4 | ||||
-rw-r--r-- | src/include/postgres.h | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/include/c.h b/src/include/c.h index d38788ec799..ca7ff8663a7 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -619,10 +619,6 @@ typedef NameData *Name; #define AssertState(condition) \ Trap(!(condition), "BadState") -extern void ExceptionalCondition(const char *conditionName, - const char *errorType, - const char *fileName, int lineNumber) __attribute__((noreturn)); - #endif /* USE_ASSERT_CHECKING && !FRONTEND */ diff --git a/src/include/postgres.h b/src/include/postgres.h index 9808bdca467..f9c5527932e 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -639,9 +639,15 @@ extern Datum Float8GetDatum(float8 X); */ /* - * This declaration supports the assertion-related macros in c.h. This is here - * because that file doesn't have PGDLLIMPORT in the right place. + * These declarations supports the assertion-related macros in c.h. + * assert_enabled is here because that file doesn't have PGDLLIMPORT in the + * right place, and ExceptionalCondition must be present, for the backend only, + * even when assertions are not enabled. */ extern PGDLLIMPORT bool assert_enabled; +extern void ExceptionalCondition(const char *conditionName, + const char *errorType, + const char *fileName, int lineNumber) __attribute__((noreturn)); + #endif /* POSTGRES_H */ |