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
|
* ICU-related field. Only the libc-related fields or the ICU-related field
|
||||||
* is set, never both.
|
* is set, never both.
|
||||||
*/
|
*/
|
||||||
char *colliculocale;
|
char *colllocale;
|
||||||
bool isnull;
|
bool isnull;
|
||||||
|
|
||||||
Datum datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_collcollate,
|
Datum datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_collcollate,
|
||||||
|
@ -101,17 +101,17 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
||||||
collctype = NULL;
|
collctype = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_colliculocale, &isnull);
|
datum = SysCacheGetAttr(COLLOID, heapTuple, Anum_pg_collation_colllocale, &isnull);
|
||||||
if (!isnull)
|
if (!isnull)
|
||||||
{
|
{
|
||||||
colliculocale = TextDatumGetCString(datum);
|
colllocale = TextDatumGetCString(datum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colliculocale = NULL;
|
colllocale = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert((collcollate && collctype) || colliculocale);
|
Assert((collcollate && collctype) || colllocale);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -147,12 +147,12 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
||||||
*quotedCollationName, providerString);
|
*quotedCollationName, providerString);
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
if (colliculocale)
|
if (colllocale)
|
||||||
{
|
{
|
||||||
appendStringInfo(&collationNameDef,
|
appendStringInfo(&collationNameDef,
|
||||||
", locale = %s",
|
", locale = %s",
|
||||||
quote_literal_cstr(colliculocale));
|
quote_literal_cstr(colllocale));
|
||||||
pfree(colliculocale);
|
pfree(colllocale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,9 +57,6 @@ typedef int ObjectClass;
|
||||||
#define OCLASS_AM AccessMethodRelationId
|
#define OCLASS_AM AccessMethodRelationId
|
||||||
#define OCLASS_TSTEMPLATE TSTemplateRelationId
|
#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"
|
#include "commands/tablecmds.h"
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -113,6 +110,8 @@ getStxstattarget_compat(HeapTuple tup)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#define Anum_pg_collation_colllocale Anum_pg_collation_colliculocale
|
||||||
|
|
||||||
#include "access/htup_details.h"
|
#include "access/htup_details.h"
|
||||||
static inline int32
|
static inline int32
|
||||||
getAttstattarget_compat(HeapTuple attTuple)
|
getAttstattarget_compat(HeapTuple attTuple)
|
||||||
|
|
Loading…
Reference in New Issue