aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_relation.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-07-16 06:33:46 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-07-16 06:33:46 +0000
commitde160e2c001fc77168ff1edc815ceeec0c6d4244 (patch)
tree15afc931e1e23706b8916619581ddd5c0bcedcee /src/backend/parser/parse_relation.c
parent4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff)
downloadpostgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.tar.gz
postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.zip
Make backend header files C++ safe
This alters various incidental uses of C++ key words to use other similar identifiers, so that a C++ compiler won't choke outright. You still (probably) need extern "C" { }; around the inclusion of backend headers. based on a patch by Kurt Harriman <harriman@acm.org> Also add a script cpluspluscheck to check for C++ compatibility in the future. As of right now, this passes without error for me.
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r--src/backend/parser/parse_relation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index b506c042c54..b0fb0b6ae03 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.142 2009/06/11 14:49:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.143 2009/07/16 06:33:43 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1188,13 +1188,13 @@ addRangeTableEntryForFunction(ParseState *pstate,
int32 attrtypmod;
attrname = pstrdup(n->colname);
- if (n->typename->setof)
+ if (n->typeName->setof)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("column \"%s\" cannot be declared SETOF",
attrname),
- parser_errposition(pstate, n->typename->location)));
- attrtype = typenameTypeId(pstate, n->typename, &attrtypmod);
+ parser_errposition(pstate, n->typeName->location)));
+ attrtype = typenameTypeId(pstate, n->typeName, &attrtypmod);
eref->colnames = lappend(eref->colnames, makeString(attrname));
rte->funccoltypes = lappend_oid(rte->funccoltypes, attrtype);
rte->funccoltypmods = lappend_int(rte->funccoltypmods, attrtypmod);