mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.126 2009/06/11 14:48:53 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.127 2009/07/16 06:33:42 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@ -538,10 +538,10 @@ BuildDescForRelation(List *schema)
|
||||
attnum++;
|
||||
|
||||
attname = entry->colname;
|
||||
atttypid = typenameTypeId(NULL, entry->typename, &atttypmod);
|
||||
attdim = list_length(entry->typename->arrayBounds);
|
||||
atttypid = typenameTypeId(NULL, entry->typeName, &atttypmod);
|
||||
attdim = list_length(entry->typeName->arrayBounds);
|
||||
|
||||
if (entry->typename->setof)
|
||||
if (entry->typeName->setof)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
|
||||
errmsg("column \"%s\" cannot be declared SETOF",
|
||||
|
Reference in New Issue
Block a user