Add a warning when a node fails to find OID for the given relation.
authorPavan Deolasee <[email protected]>
Tue, 21 Jun 2016 05:47:23 +0000 (11:17 +0530)
committerPavan Deolasee <[email protected]>
Tue, 21 Jun 2016 05:47:23 +0000 (11:17 +0530)
Regression shows a bunch of warnings which should be fixed over due course

src/backend/nodes/readfuncs.c

index bd9449f3cb7c2a2f2ff70aecbd6db77b9654f04c..c3426bda6b6d2314cb91a7f338ef9e3065ab0429 100644 (file)
@@ -239,8 +239,13 @@ set_portable_input(bool value)
                token = pg_strtok(&length); /* get relname */ \
                relname = nullable_string(token, length); \
                if (relname) \
+               { \
                        relid = get_relname_relid(relname, \
                                                                                                        NSP_OID(nspname)); \
+                       if (!OidIsValid(relid)) \
+                               elog(WARNING, "could not find OID for relation %s.%s", nspname,\
+                                               relname); \
+               } \
                else \
                        relid = InvalidOid; \
        } while (0)