PostgreSQL integer and floating point division
PostgreSQL provides the utility program pg_dump to generate a text file with SQL commands that, when fed back to the server, will recreate the database in the same state as it was at the time of the dump.
pg_dump dbname > outfile
pg_dump can be used from the Linux console.
For example, if you want to backup a database called ‘my_database’ you run, from the console:
pg_dump my_database > my_database.sql
There are three PostgreSQL character types:
char: fixed length. varchar: variable length with optional limit. text: variable length without limit. char and varchar need an argument n to specify the characters length or limit.
char(n) The char(n) type stores fixed length strings.
If the string you are adding is shorter than n, spaces are added to make up the difference. For example, if ‘n’ is 7 and the string is house, which has 5 characters, the following value will be added: house .