[GENERAL] Trying to create DB / user to import some data

2013-09-26 Thread mdr
I am new to Postgres but not to DBMS. Running on Postgres 9.1 Ubuntu 13.04. I log in as Postgres user: psql -h localhost -U postgres and then I create a db and user and allow grants to the user like this: create user import_dbms_user with password 'import_dbms'; create database import_dbms_db; gr

Re: [GENERAL] Trying to create DB / user to import some data

2013-09-27 Thread mdr
Hi Steven - Thanks. Worked great. I assumed it would assume the dbname to be import_dbms_db as import_dbms_user was granted admin privileges on it. Also I do have import_dbms_user and import_dbms_db in my pg_hba.conf as: local import_dbms_db import_dbms_user md5 I still need that - correct? And

Re: [GENERAL] Trying to create DB / user to import some data

2013-09-27 Thread mdr
Thanks for your help Adrian. Works great. I had a few other questions on creating primary keys after create table using alter table. I will post them separately so this thread is closed. Thank you both again. Mono -- View this message in context: http://postgresql.1045698.n5.nabble.com/Tryi

[GENERAL] Creating Primary Key after CREATE TABLE: Is Sequence created?

2013-09-27 Thread mdr
I had a question on creating PK with alter table, after table is created. I understand I create a PK id during create table by stating id as follows: id serial primary key It implicitly creates index and the sequence testing_id_seq to be associated with the id field. I can list the sequence wit

Re: [GENERAL] Creating Primary Key after CREATE TABLE: Is Sequence created?

2013-09-27 Thread mdr
Hi David and John - Thank you for your answers on the SERIAL, SEQUENCE and thus PRIMARY KEY. I did not realize there was a column of type SERIAL that creates a SEQUENCE. However, now I have a different question. Is it possible to create a column of type SQL:2011 types (INTEGER or such) and then