PostgreSQL by default listen only on local UNIX sockect.  To enable TCP/IP endpoint uncomment in your postgresql.conf file:

listen_addresses = '*'

Where '*' - listen on all interfaces. Or put your IP number here if you want listen on specific IP only. 

http://www.postgresql.org/docs/9.1/static/runtime-config-connection.html#GUC-LISTEN-ADDRESSES

Can't connect to postgresql on local machine using IP + pgadmin
I have this query that returns the_geom as text. However how could I also apply a transform to the same query. I can do this separately with the second example. Though I would like to do this to all the rows in my table, and in that example I copied the st_astext output into the transform query.

select  sitename,  st_astext(the_geom) from sites_tbl;                                 

sitename   |                st_astext

Belfast A    | POINT(145592 530021)

ST_AsText(ST_Transform(ST_SetSRID('POINT(145592 530021)'::geometry,27700), 4326));
