src/server/plugins/postgresql/config.c

changeset 659
07b815faa6ac
parent 579
e10457d74fe1
equal deleted inserted replaced
658:7290604d846d 659:07b815faa6ac
342 log_ereport(LOG_MISCONFIG, "pg: config %s: no properties configured for extension", file_path); 342 log_ereport(LOG_MISCONFIG, "pg: config %s: no properties configured for extension", file_path);
343 return 1; 343 return 1;
344 } 344 }
345 345
346 // check if the table was already specified 346 // check if the table was already specified
347 if(cxMapGet(ext->table_lookup, cx_hash_key_str(table))) { 347 if(cxMapGet(ext->table_lookup, table)) {
348 log_ereport(LOG_MISCONFIG, "pg: config %s: extension table %s not unique", file_path, table); 348 log_ereport(LOG_MISCONFIG, "pg: config %s: extension table %s not unique", file_path, table);
349 return 1; 349 return 1;
350 } 350 }
351 // mark table as used 351 // mark table as used
352 // tabname will be used later, so ist must be allocated in the pool 352 // tabname will be used later, so ist must be allocated in the pool
358 exttable.table = tabname; 358 exttable.table = tabname;
359 exttable.isused = 0; // not relevant in config 359 exttable.isused = 0; // not relevant in config
360 int tableindex = (int)cxListSize(ext->tables); 360 int tableindex = (int)cxListSize(ext->tables);
361 cxListAdd(ext->tables, &exttable); 361 cxListAdd(ext->tables, &exttable);
362 362
363 if(cxMapPut(ext->table_lookup, cx_hash_key_str(table), (void*)table)) { 363 if(cxMapPut(ext->table_lookup, table, (void*)table)) {
364 return 1; 364 return 1;
365 } 365 }
366 366
367 CxIterator iter = cxListIterator(properties); 367 CxIterator iter = cxListIterator(properties);
368 cx_foreach(xmlNode *, ps, iter) { 368 cx_foreach(xmlNode *, ps, iter) {

mercurial