Tue Nov 22 12:20:33 PST 2011
- Previous message: [Slony1-bugs] [Bug 250] Log shipper does not report application name
- Next message: [Slony1-bugs] [Bug 250] Log shipper does not report application name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://www.slony.info/bugzilla/show_bug.cgi?id=250 --- Comment #3 from Steve Singer <ssinger at ca.afilias.info> 2011-11-22 12:20:33 PST --- (In reply to comment #2) > Ready for review + dstring_init(&query); + slon_mkquery(&query,"select 1 from pg_catalog.pg_settings where name= 'application_name'; "); + res = PQexec (dbconn, dstring_data(&query)); + + if (PQresultStatus(res) != PGRES_TUPLES_OK) + return -1; &query should be free'd before the return Just free it before the PQresultStatus call. + dstring_free(&query); + + if (PQntuples(res) == 0) + { + PQclear(res); + } else { + PQclear(res); + dstring_init(&query); + slon_mkquery(&query,"SET application_name TO 'slony_logshipper'; "); + res=PQexec(dbconn, dstring_data(&query)); + dstring_free(&query); + PQclear(res); + } + Otherwise this seems fine for checkin. -- Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
- Previous message: [Slony1-bugs] [Bug 250] Log shipper does not report application name
- Next message: [Slony1-bugs] [Bug 250] Log shipper does not report application name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-bugs mailing list