With a little side of applesauce...

Thursday, November 11, 2010

SVN - change URL of repo

We had a server change, which changed the port of the Subversion repo, which in turn broke my checked out projects. In order to fix this, I ran:
svn switch --relocate https://mysvnhost.org/repos/project/trunk http://mysvnhost.org/repos/project/trunk

The answer was found here:

Tuesday, November 9, 2010

EMACS - enhancements for SQL-Mode

I found these great Elisp examples for enhancing SQL-Mode:

"Better Buffer Naming" - "*SQL: dbhost/dbname*"
"Support for TCP Ports" - allows for you to specify multiple TCP ports on a single host.
"Support for Preset Connections" - like bookmarks, only for DB connections :)

My only real changes were to:
1. change pool-a/pool-b to pool-myhost_dbname. This gives me a quick visual to see to which host and db I will be connecting (grammar? :P ).
2. use sql-product 'postgres for PostgreSQL.
(setq sql-connection-alist
(sql-product 'postgres)
(sql-server "myhost.example.org")
(sql-user "myuser")
(sql-password "mypass")
(sql-database "dbname")
(sql-port 5432))))

(defun sql-pool-myhost_dbname ()
(sql-connect-preset 'pool-myhost_dbname))

Here is the great article: