Commits

Tuukka Norri committed e438776

Reloids are no longer used with modification or lock handling (fixes #218)

  • Participants
  • Parent commits 3880f98

Comments (0)

Files changed (5)

Resources/BaseTenModifications.sql.m4

 -- BaseTenModifications.sql.m4
 -- BaseTen
 --
--- Copyright (C) 2006-2008 Marko Karppinen & Co. LLC.
+-- Copyright (C) 2006-2010 Marko Karppinen & Co. LLC.
 --
 -- Before using this software, please review the available licensing options
 -- by visiting http://basetenframework.org/licensing/ or by contacting
 	--RAISE NOTICE 'Observing: %', nname;
 	EXECUTE 'LISTEN ' || quote_ident (nname);
 
-	retval := (reloid, relid, nname, null::TEXT, null::TEXT);
+	retval := (relid, nname, null::TEXT, null::TEXT);
 	RETURN retval;
 END;
 $$ VOLATILE LANGUAGE PLPGSQL;
 	--RAISE NOTICE 'Observing: %', nname;
 	EXECUTE 'LISTEN ' || quote_ident (nname);
 
-	retval := (reloid, relid, nname, "baseten"._lock_fn (relid), "baseten"._lock_table (relid));
+	retval := (relid, nname, "baseten"._lock_fn (relid), "baseten"._lock_table (relid));
 	RETURN retval;
 END;
 $$ VOLATILE LANGUAGE PLPGSQL;

Sources/BXPGClearLocksHandler.m

 // BXPGClearLocksHandler.m
 // BaseTen
 //
-// Copyright (C) 2006-2008 Marko Karppinen & Co. LLC.
+// Copyright (C) 2006-2010 Marko Karppinen & Co. LLC.
 //
 // Before using this software, please review the available licensing options
 // by visiting http://basetenframework.org/licensing/ or by contacting
     
     //Which tables have pending locks?
     NSString* query = 
-	@"SELECT relid, last_date, lock_table_name "
-	@" FROM baseten.pending_locks "
-	@" WHERE last_date > COALESCE ($1, '-infinity')::timestamp "
-	@"  AND relid = ANY ($2) ";
+	@"SELECT l.last_date, l.lock_table_name, r.relname, r.nspname "
+	@" FROM baseten.pending_locks l "
+	@" INNER JOIN baseten.relation r ON (r.id = l.relid) "
+	@" WHERE l.last_date > COALESCE ($1, '-infinity')::timestamp "
+	@"  AND l.relid = ANY ($2) ";
     PGTSResultSet* res = [mConnection executeQuery: query parameters: mLastCheck, relids];
     if (NO == [res querySucceeded])
 	{
 	while ([res advanceRow])
 	{
 		[ids removeAllObjects];
-		NSString* query = nil;
-		NSNumber* reloid = [res valueForKey: @"reloid"];
-		PGTSTableDescription* table = [[mConnection databaseDescription] tableWithOid: [reloid PGTSOidValue]];
+		NSString *query = nil;
+		NSString *relname = [res valueForKey: @"relname"];
+		NSString *nspname = [res valueForKey: @"nspname"];
+		PGTSTableDescription *table = [[mConnection databaseDescription] table: relname inSchema: nspname];
 		
 		{
 			NSString* queryFormat =

Sources/BXPGTransactionHandler.m

 // BXPGTransactionHandler.m
 // BaseTen
 //
-// Copyright (C) 2006-2008 Marko Karppinen & Co. LLC.
+// Copyright (C) 2006-2010 Marko Karppinen & Co. LLC.
 //
 // Before using this software, please review the available licensing options
 // by visiting http://basetenframework.org/licensing/ or by contacting
 			NSString* query = 
 			@"SELECT "
 			@" CURRENT_TIMESTAMP::TIMESTAMP WITHOUT TIME ZONE AS ts, "
-			@" null AS reloid, "
 			@" null AS relid, "
 			@" null AS n_name, "
 			@" null AS fn_name, "

Tools/ReleaseDMG/DMG-design.png

Old
Old image
New
New image

Tools/ReleaseDMG/DMG_DS_Store

Binary file modified.