Cisco IM&P Chat Room Postgres Server

If you want to implement chat rooms/persistent chat or chat logging with Cisco IM and Presence, you need to setup an external postgres server.  The setup is relatively easy (I used a ubuntu server), and can be found here.

The problem I came across was that while testing, I created several chat rooms, then deleted the users who owned those chat rooms.  I needed a way to delete those test chat rooms, which needs to be done on the postgres server (since the users no longer existed).  Here are the steps I used:

  1. SSH to postgres server and become the postgres user: su - postgres
  2. As the postgres user, login to the database: psql -d tcmadb
  3. To view the chat rooms stored in the database, run: SELECT room_jid FROM tc_rooms;
  4. I wanted to delete all chat rooms previously created, so I truncated the table: TRUNCATE tc_rooms;
  5. All done!  All chat rooms are now deleted.  If you want to delete a specific room, you'll need to select and delete a specific row instead of truncate

Additional useful postgres database commands:

Show all tables: \dt
To quit: \q
Show all rows in a table: \d+ table_name