Add a const decoration
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 25 Jan 2024 12:34:49 +0000 (13:34 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 25 Jan 2024 12:34:49 +0000 (13:34 +0100)
Useful for a subsequent patch.

Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e4da@eisentraut.org

src/backend/parser/parse_type.c
src/include/parser/parse_type.h

index a33b59c62e2256c8d297bdcdbadec602f65f9db8..c1a937a43b4df1e70b4dddb4e8dd1a3e67959f75 100644 (file)
@@ -537,7 +537,7 @@ LookupCollation(ParseState *pstate, List *collnames, int location)
  * pstate is only used for error location purposes, and can be NULL.
  */
 Oid
-GetColumnDefCollation(ParseState *pstate, ColumnDef *coldef, Oid typeOid)
+GetColumnDefCollation(ParseState *pstate, const ColumnDef *coldef, Oid typeOid)
 {
        Oid                     result;
        Oid                     typcollation = get_typcollation(typeOid);
index e5fa759120cc14daffdf5181aefd1f7488757350..b62e7a6ce99a800a5db76583ee6bf707fc2e20a4 100644 (file)
@@ -36,7 +36,7 @@ extern char *TypeNameToString(const TypeName *typeName);
 extern char *TypeNameListToString(List *typenames);
 
 extern Oid     LookupCollation(ParseState *pstate, List *collnames, int location);
-extern Oid     GetColumnDefCollation(ParseState *pstate, ColumnDef *coldef, Oid typeOid);
+extern Oid     GetColumnDefCollation(ParseState *pstate, const ColumnDef *coldef, Oid typeOid);
 
 extern Type typeidType(Oid id);