Creating an unmodifiable table in Postgres

Here's a simple and effective way of avoiding any accidental INSERT/UPDATE/DELETE operation against any table:

(developed this as part of Postgres porting of Spacewalk )


CREATE TABLE dual ( dummy char );
INSERT INTO dual values ( 'X' );
CREATE OR REPLACE RULE insert_dual AS ON INSERT TO dual DO INSTEAD NOTHING;
CREATE OR REPLACE RULE update_dual AS ON UPDATE TO dual DO INSTEAD NOTHING;
CREATE OR REPLACE RULE delete_dual AS ON DELETE TO dual DO INSTEAD NOTHING;

Windows XP WGA (Windows Genuine Advantage) bypass

Just something I came across, thought would be helpful in future...

Kill the process wgatray.exe in Windows TaskManager (Select it then right click and select End task) and restart Windows XP in safe mode. Now delete the following files:

Delete WgaTray.exe from c:\windowss\system32
Delete WgaTray.exe from c:\windows\system32\dllcache

Start Windows Registry editor and delete the folder "WGALOGON" located in the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Windows NT\CurrentVersion\WinlogonNotify.
Delete all references in your registry to WgaTray.exe (repeat search using F3 function key).