mirror of https://github.com/citusdata/citus.git
Address review on Define colliculocale and daticulocale since they have been renamed
parent
ef60a25b87
commit
06727b60e7
|
@ -77,7 +77,7 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
|||
* ICU-related field. Only the libc-related fields or the ICU-related field
|
||||
* is set, never both.
|
||||
*/
|
||||
char *colliculocale;
|
||||
char *colllocale;
|
||||
bool isnull;
|
||||
|
||||
Datum datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_collcollate,
|
||||
|
@ -101,17 +101,17 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
|||
collctype = NULL;
|
||||
}
|
||||
|
||||
datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_colliculocale, &isnull);
|
||||
datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_colllocale, &isnull);
|
||||
if (!isnull)
|
||||
{
|
||||
colliculocale = TextDatumGetCString(datum);
|
||||
colllocale = TextDatumGetCString(datum);
|
||||
}
|
||||
else
|
||||
{
|
||||
colliculocale = NULL;
|
||||
colllocale = NULL;
|
||||
}
|
||||
|
||||
Assert((collcollate && collctype) || colliculocale);
|
||||
Assert((collcollate && collctype) || colllocale);
|
||||
#else
|
||||
|
||||
/*
|
||||
|
@ -147,12 +147,12 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
|||
*quotedCollationName, providerString);
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||
if (colliculocale)
|
||||
if (colllocale)
|
||||
{
|
||||
appendStringInfo(&collationNameDef,
|
||||
", locale = %s",
|
||||
quote_literal_cstr(colliculocale));
|
||||
pfree(colliculocale);
|
||||
quote_literal_cstr(colllocale));
|
||||
pfree(colllocale);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -57,9 +57,6 @@ typedef int ObjectClass;
|
|||
#define OCLASS_AM AccessMethodRelationId
|
||||
#define OCLASS_TSTEMPLATE TSTemplateRelationId
|
||||
|
||||
#define Anum_pg_collation_colliculocale Anum_pg_collation_colllocale
|
||||
#define Anum_pg_database_daticulocale Anum_pg_database_datlocale
|
||||
|
||||
#include "commands/tablecmds.h"
|
||||
|
||||
static inline void
|
||||
|
@ -113,6 +110,8 @@ getStxstattarget_compat(HeapTuple tup)
|
|||
|
||||
#else
|
||||
|
||||
#define Anum_pg_collation_colllocale Anum_pg_collation_colliculocale
|
||||
|
||||
#include "access/htup_details.h"
|
||||
static inline int32
|
||||
getAttstattarget_compat(HeapTuple attTuple)
|
||||
|
|
Loading…
Reference in New Issue