I have installed postgresql on my ubuntu machine using,
apt-get install postgresql-9.1
Now I am reading the manual however could not figure out where the tutorial files (e.g., basics.sql) are.
Where can I find or download them?
All the data needed for a database cluster is stored within the cluster's data directory, commonly referred to as PGDATA (after the name of the environment variable that can be used to define it). A common location for PGDATA is /var/lib/pgsql/data.
There's no history in the database itself, if you're using psql you can use "\s" to see your command history there. You can get future queries or other types of operations into the log files by setting log_statement in the postgresql. conf file.
PostgreSQL for Windows installs the PGDATA directory by default into "C:\Program Files\PostgreSQL\some version\data".
Use \l or \l+ in psql to show all databases in the current PostgreSQL server. Use the SELECT statement to query data from the pg_database to get all databases.
They're in the PostgreSQL source distribution:
https://github.com/postgres/postgres/tree/master/src/tutorial
Aside: the latest PostgreSQL is 9.3, not 9.1:
http://www.postgresql.org/docs/current/static/tutorial-sql-intro.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With