Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b8868bd

Browse files
committed
fix some gcc-ism's
1 parent ccb3090 commit b8868bd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

multimaster--1.0.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ CREATE FUNCTION mtm.referee_poll(xid bigint) RETURNS bigint
103103
AS 'MODULE_PATHNAME','mtm_referee_poll'
104104
LANGUAGE C;
105105

106-
CREATE TABLE IF NOT EXISTS mtm.local_tables(rel_schema text, rel_name text, primary key(rel_schema, rel_name));
106+
CREATE TABLE IF NOT EXISTS mtm.local_tables(rel_schema name, rel_name name, primary key(rel_schema, rel_name));
107107

108108
CREATE OR REPLACE FUNCTION mtm.alter_sequences() RETURNS boolean AS
109109
$$

multimaster.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -914,14 +914,15 @@ MtmResetTransaction()
914914
x->gid[0] = '\0';
915915
}
916916

917-
917+
#if 0
918918
static const char* const isoLevelStr[] =
919919
{
920920
"read uncommitted",
921921
"read committed",
922922
"repeatable read",
923923
"serializable"
924924
};
925+
#endif
925926

926927
bool MtmTransIsActive(void)
927928
{
@@ -2589,8 +2590,8 @@ void MtmMakeTableLocal(char const* schema, char const* name)
25892590

25902591

25912592
typedef struct {
2592-
text schema;
2593-
text name;
2593+
NameData schema;
2594+
NameData name;
25942595
} MtmLocalTablesTuple;
25952596

25962597
static void MtmLoadLocalTables(void)
@@ -2610,7 +2611,7 @@ static void MtmLoadLocalTables(void)
26102611
while (HeapTupleIsValid(tuple = systable_getnext(scan)))
26112612
{
26122613
MtmLocalTablesTuple *t = (MtmLocalTablesTuple*) GETSTRUCT(tuple);
2613-
MtmMakeTableLocal(text_to_cstring(&t->schema), text_to_cstring(&t->name));
2614+
MtmMakeTableLocal(NameStr(t->schema), NameStr(t->name));
26142615
}
26152616

26162617
systable_endscan(scan);

0 commit comments

Comments
 (0)