Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-9) was last changed on 02-May-2021 10:21 by BlakeMcBride

This page was created on 02-May-2011 21:13 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
!psql
!psql - command line database query tool
At line 7 changed one line
to see all output:
to save all output:
At line 18 added one line
\d table display schema for table
At line 24 added 7 lines
show all;
show server_version;
show config_file;
show data_directory;
show hba_file;
}}}
{{{
At line 35 added one line
! Data Types
At line 37 added 23 lines
| smallint | 2
| integer | 4
| bigint | 8
| real | 4
| double precision | 8
| smallserial | 2
| serial | 4
| bigserial | 8
| money | 8
| char(n) |
| varchar(n) |
| text | variable length, unlimited
| bytea | binary, variable length
| timestamp | date and time | not null default current_timestamp
| date |
---------------------------------------------------------------------------
! Passing a password into psql
{{{export PGPASSWORD=ThePassword}}}
---------------------------------------------------------------------------
At line 31 changed one line
psql arahant postgres -c 'select screen_id, substring(filename from 24) as "File Name", name from screen order by filename;' >output.txt
psql mydb postgres -c 'select screen_id, substring(filename from 24) as "File Name", name from screen order by filename;' >output.txt
psql mydb postgres -f file-name >output.txt
At line 115 added 23 lines
!CSV file format
Exporting:
{{{
copy (select lname, fname, personal_email from person where personal_email <> '')
to '/tmp/file.csv'
with (format csv);
}}}
Importing:
{{{
copy person (user_id, user_lname, user_fname, email_address, user_password, birth_date, sex, when_added)
from '/tmp/sample-users.csv'
with (format csv);
}}}
The csv files must be in the /tmp directory or somewhere that is globally readable because this command is run by a process that is connected to the postgres user. It, therefore, can only access files that it has permission to read.
The import command may exclude the column list if all the columns are used and all of the columns are in the order specified in the schema.
---------------------------------------------------------------------------
At line 177 removed one line
Version Date Modified Size Author Changes ... Change note
9 02-May-2021 10:21 6.14 kB BlakeMcBride to previous
8 13-Jul-2016 14:35 5.677 kB BlakeMcBride to previous | to last
7 20-Jun-2016 12:45 5.527 kB BlakeMcBride to previous | to last
6 15-Feb-2016 14:21 5.485 kB BlakeMcBride to previous | to last
5 10-Jul-2014 10:04 5.487 kB BlakeMcBride to previous | to last
4 18-Dec-2013 20:52 5.452 kB BlakeMcBride to previous | to last
3 17-Nov-2013 19:08 5.352 kB BlakeMcBride to previous | to last
2 24-Jul-2013 15:47 4.97 kB BlakeMcBride to previous | to last
1 02-May-2011 21:13 4.546 kB UnknownAuthor to last
« This page (revision-9) was last changed on 02-May-2021 10:21 by BlakeMcBride