Posts Tagged ‘postgres’

PHP is able to communicate with PostgreSQL databases using some relatively simple calls. In a similar manner to other database systems, the script needs to do the following: connect to the database using pg_connect execute queries using pg_query and pg_free_result close the database connection using pg_close For example, consider the following script: <?PHP // database […]

If you’re writing functions in postgres then you’ll probably be using a language such as plpgsql. Let’s say you’re writing a script to to add all of these functions to a new database, but you don’t know whether that language has been created yet. You’ll probably want to do something like CREATE LANGUAGE IF NOT […]


Posted: 18th February 2010 by Tim in PostgreSQL
Tags: , , , , , ,

If you’re looking for a command to give you a list of schemas in PostgreSQL, much like MySQL’s SHOW SCHEMAS command, then \dn is what you’re looking for. ie: \dn List of schemas Name               | Owner ——————-+——— information_schema | postgres pg_catalog         | postgres person             | tim …