Hi Matej,
The text you have been given is a pointer used by PHP to track the result of your SQL query. You need to break up the results by using one of the pg_fetch_.. commands (choose from array, object or row) to manipulate the data.
Look at it like this - say you queried the database to return 100 records, but you wanted to but the different fields in HTML table cells, just printing the SQL result would just do a dump (if it was allowed by PHP) of the data in no particular format!
Take a peek at the postgreSQL pages in the manual for more advice!
http://www.php.net/manual/en/ref.pgsql.php
Kind Regards,
David Grant