diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/relation.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index b106c590e3e..9e9e7afbc84 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.154 2008/01/11 04:02:18 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.155 2008/03/24 21:53:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -693,6 +693,8 @@ typedef struct TidPath * * Note: it is possible for "subpaths" to contain only one, or even no, * elements. These cases are optimized during create_append_plan. + * In particular, an AppendPath with no subpaths is a "dummy" path that + * is created to represent the case that a relation is provably empty. */ typedef struct AppendPath { @@ -700,6 +702,9 @@ typedef struct AppendPath List *subpaths; /* list of component Paths */ } AppendPath; +#define IS_DUMMY_PATH(p) \ + (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL) + /* * ResultPath represents use of a Result plan node to compute a variable-free * targetlist with no underlying tables (a "SELECT expressions" query). |