Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
opendb [2018/04/25 17:05]
qcbs [Using the RPostgreSQL package]
opendb [2019/04/30 15:39] (current)
qcbs [Importing a table in LibreOffice Base from Calc]
Line 45: Line 45:
 ===== Accessing PSQL ===== ===== Accessing PSQL =====
 **On Windows and Mac**: ​ **On Windows and Mac**: ​
-  * Find PostgreSQL ​9.X in the Start menu and click on "SQL shell (psql)"​+  * Find PostgreSQL ​10.X in the Start menu and click on "SQL shell (psql)"​
   * In the shell, accept the default values by pressing enter for the username and server name and type the proper Postgres password (chosen above). Note that you will not see anything while typing the password. This is normal. ​   * In the shell, accept the default values by pressing enter for the username and server name and type the proper Postgres password (chosen above). Note that you will not see anything while typing the password. This is normal. ​
  
Line 59: Line 59:
 </​file>​ </​file>​
   - Edit data/​pg_hba.conf and change '​md5'​ to '​trust'​ in the '​local'​ and '​host'​ lines   - Edit data/​pg_hba.conf and change '​md5'​ to '​trust'​ in the '​local'​ and '​host'​ lines
-  - To do this on a mac, open a terminal and type 'nano /​Library/​PostgreSQL/​9.5/​data/​pg_hba.conf'​. Make the necessary changes, hit CTRL-O and then CTRL-X.+  - To do this on a mac, open a terminal and type 'nano /​Library/​PostgreSQL/​10/​data/​pg_hba.conf'​. Make the necessary changes, hit CTRL-O and then CTRL-X.
   - Start the daemon   - Start the daemon
 <​file>​ <​file>​
-sudo launchctl load /​Library/​LaunchDaemons/​com.edb.launchd.postgresql-9.5.plist+sudo launchctl load /​Library/​LaunchDaemons/​com.edb.launchd.postgresql-10.plist
 </​file>​ </​file>​
  
Line 354: Line 354:
   * Select the entire worksheet with ctrl-a;   * Select the entire worksheet with ctrl-a;
   * Open LibreOffice Base and go to Edit...paste. Call the new table public.species_acro. Select '​Definition and data'. Select to use first line as column names. Do not create a primary key at this point.   * Open LibreOffice Base and go to Edit...paste. Call the new table public.species_acro. Select '​Definition and data'. Select to use first line as column names. Do not create a primary key at this point.
-  * Follow the wizard... Move all columns to the right to select them. Then, specify the proper data format (verify the types of attributes in the table) for the other columns. Right click on the column named 'unique_id' and select '​Primary Key'. Set the unique_id as int [int4], full_name as text [varchar] with 200 characters and species_id as text [varchar] with 30 characters. ​+  * Follow the wizard... Move all columns to the right to select them. Then, specify the proper data format (verify the types of attributes in the table) for the other columns. Right click on the column named 'species_id' and select '​Primary Key'. Set the unique_id as int [int4], full_name as text [varchar] with 200 characters and species_id as text [varchar] with 30 characters. ​