[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pg-database.sql doesn't create Admin user
- Subject: Re: Pg-database.sql doesn't create Admin user
- From: DTK <..hidden..>
- Date: Tue, 26 Feb 2008 01:46:18 -0500
Sorry have a correction for the commands: But there is still no Admin user
# chown -R postgres /opt/ledgersmb
# su postgres
? createuser -d ledgersmb --createdb --createrole --superuser -P
? createdb ledgersmb
? createlang plpgsql ledgersmb
? psql ledgersmb < /opt/ledgersmb/sql/Pg-database.sql
? exit
# chown -R www-data.www-data /opt/ledgersmb
On Tue, Feb 26, 2008 at 12:28 AM, DTK <..hidden..> wrote:
> Hello
>
> I am loading the database with following command. (Way below is the
> log for this)
> # chown -R postgres /opt/ledgersmb
> # su postgres
> ? psql ledgersmb < /opt/ledgersmb/sql/Pg-database.sql
> ? exit
> # chown -R www-data.www-data /opt/ledgersmb
>
>
> The tables are being created but the admin user is not.
> There is no user in users_conf
> When I go in and manually execute
> INSERT INTO users_conf(id,password) VALUES (currval('users_id_seq'),NULL);
> I get this error:
> Failed to execute SQL : SQL INSERT INTO users_conf(id,password) VALUES
> (currval('users_id_seq'),NULL); failed : ERROR: currval of sequence
> "users_id_seq" is not yet defined in this session
>
> What am I doing wrong here?
>
> Thanks,
> Dennis T Kaplan
>
> ==============
> LOG FOR psql ledgersmb < /opt/ledgersmb/sql/Pg-database.sql
>
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "entity_id_seq" for serial column "entity.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_pkey" for table "entity"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "entity_id_key" for table "entity"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "entity_class_id_seq" for serial column "entity_class.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_class_pkey" for table "entity_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_class_to_entity_pkey" for table
> "entity_class_to_entity"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "users_id_seq" for serial column "users.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "users_pkey" for table "users"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "users_id_key" for table "users"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "users_conf_pkey" for table "users_conf"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "session_session_id_seq" for serial column
> "session.session_id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "session_pkey" for table "session"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "transactions_pkey" for table "transactions"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "country_id_seq" for serial column "country.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "country_pkey" for table "country"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "location_class_id_seq" for serial column "location_class.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "location_class_pkey" for table "location_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "location_class_id_key" for table "location_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "location_id_seq" for serial column "location.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "location_pkey" for table "location"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "company_id_seq" for serial column "company.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "company_pkey" for table "company"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "company_id_key" for table "company"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "company_to_location_pkey" for table
> "company_to_location"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "salutation_id_seq" for serial column "salutation.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "salutation_pkey" for table "salutation"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "salutation_id_key" for table "salutation"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "person_id_seq" for serial column "person.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "person_pkey" for table "person"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "person_to_location_pkey" for table
> "person_to_location"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "person_to_company_pkey" for table
> "person_to_company"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_other_name_pkey" for table
> "entity_other_name"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "person_to_entity_pkey" for table
> "person_to_entity"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "company_to_entity_pkey" for table
> "company_to_entity"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "contact_class_id_seq" for serial column "contact_class.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "contact_class_pkey" for table "contact_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "contact_class_id_key" for table "contact_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "person_to_contact_pkey" for table
> "person_to_contact"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "company_to_contact_pkey" for table
> "company_to_contact"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "note_class_id_seq" for serial column "note_class.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "note_class_pkey" for table "note_class"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "note_id_seq" for serial column "note.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "note_pkey" for table "note"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "makemodel_pkey" for table "makemodel"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "gl_pkey" for table "gl"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "chart_id_seq" for serial column "chart.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "chart_pkey" for table "chart"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "gifi_pkey" for table "gifi"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "defaults_pkey" for table "defaults"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "acc_trans_entry_id_seq" for serial column
> "acc_trans.entry_id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "acc_trans_pkey" for table "acc_trans"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE will create implicit
> sequence "invoice_id_seq" for serial column "invoice.id"
> 2008-02-26 05:08:01 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "invoice_pkey" for table "invoice"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "pricegroup_id_seq" for serial column "pricegroup.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "pricegroup_pkey" for table "pricegroup"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "entity_credit_account_id_seq" for serial column
> "entity_credit_account.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_credit_account_pkey" for table
> "entity_credit_account"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "entity_credit_account_id_key" for table
> "entity_credit_account"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "entity_bank_account_id_seq" for serial column
> "entity_bank_account.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "entity_bank_account_pkey" for table
> "entity_bank_account"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "entity_bank_account_id_key" for table
> "entity_bank_account"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "employee_pkey" for table "employee"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "parts_id_seq" for serial column "parts.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "parts_pkey" for table "parts"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "assembly_pkey" for table "assembly"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "ar_pkey" for table "ar"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "ap_pkey" for table "ap"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "taxmodule_taxmodule_id_seq" for serial column
> "taxmodule.taxmodule_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "taxmodule_pkey" for table "taxmodule"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "taxcategory_taxcategory_id_seq" for serial column
> "taxcategory.taxcategory_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "taxcategory_pkey" for table "taxcategory"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "partstax_pkey" for table "partstax"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "tax_pkey" for table "tax"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "customertax_pkey" for table "customertax"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "vendortax_pkey" for table "vendortax"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "oe_class_pkey" for table "oe_class"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "oe_class_id_key" for table "oe_class"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "oe_id_seq" for serial column "oe.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "oe_pkey" for table "oe"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "orderitems_id_seq" for serial column "orderitems.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "orderitems_pkey" for table "orderitems"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "exchangerate_pkey" for table "exchangerate"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "batch_class_id_seq" for serial column "batch_class.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "batch_class_pkey" for table "batch_class"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / UNIQUE will create
> implicit index "batch_class_id_key" for table "batch_class"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "batch_id_seq" for serial column "batch.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "batch_pkey" for table "batch"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "voucher_id_seq" for serial column "voucher.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "voucher_pkey" for table "voucher"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "shipto_entry_id_seq" for serial column "shipto.entry_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "shipto_pkey" for table "shipto"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "project_id_seq" for serial column "project.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "project_pkey" for table "project"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "partsgroup_id_seq" for serial column "partsgroup.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "partsgroup_pkey" for table "partsgroup"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "status_pkey" for table "status"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "department_id_seq" for serial column "department.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "department_pkey" for table "department"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "dpt_trans_pkey" for table "dpt_trans"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "business_id_seq" for serial column "business.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "business_pkey" for table "business"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "sic_pkey" for table "sic"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "warehouse_id_seq" for serial column "warehouse.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "warehouse_pkey" for table "warehouse"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "inventory_entry_id_seq" for serial column
> "inventory.entry_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "inventory_pkey" for table "inventory"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "yearend_pkey" for table "yearend"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "partsvendor_entry_id_seq" for serial column
> "partsvendor.entry_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "partsvendor_pkey" for table "partsvendor"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "partscustomer_entry_id_seq" for serial column
> "partscustomer.entry_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "partscustomer_pkey" for table "partscustomer"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "language_pkey" for table "language"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "audittrail_entry_id_seq" for serial column
> "audittrail.entry_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "audittrail_pkey" for table "audittrail"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "translation_pkey" for table "translation"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "recurring_pkey" for table "recurring"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "recurringemail_pkey" for table "recurringemail"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "recurringprint_pkey" for table "recurringprint"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "jcitems_id_seq" for serial column "jcitems.id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "jcitems_pkey" for table "jcitems"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "custom_table_catalog_table_id_seq" for serial column
> "custom_table_catalog.table_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "custom_table_catalog_pkey" for table
> "custom_table_catalog"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE will create implicit
> sequence "custom_field_catalog_field_id_seq" for serial column
> "custom_field_catalog.field_id"
> 2008-02-26 05:08:02 GMT NOTICE: CREATE TABLE / PRIMARY KEY will
> create implicit index "custom_field_catalog_pkey" for table
> "custom_field_catalog"
> 2008-02-26 05:08:03 GMT NOTICE: CREATE TABLE will create implicit
> sequence "menu_node_id_seq" for serial column "menu_node.id"
> 2008-02-26 05:08:03 GMT NOTICE: ALTER TABLE / ADD UNIQUE will create
> implicit index "menu_node_parent_key" for table "menu_node"
> 2008-02-26 05:08:03 GMT NOTICE: ALTER TABLE / ADD PRIMARY KEY will
> create implicit index "menu_node_pkey" for table "menu_node"
> 2008-02-26 05:08:03 GMT NOTICE: CREATE TABLE will create implicit
> sequence "menu_attribute_id_seq" for serial column "menu_attribute.id"
> 2008-02-26 05:08:03 GMT NOTICE: ALTER TABLE / ADD UNIQUE will create
> implicit index "menu_attribute_id_key" for table "menu_attribute"
> 2008-02-26 05:08:03 GMT NOTICE: ALTER TABLE / ADD PRIMARY KEY will
> create implicit index "menu_attribute_pkey" for table "menu_attribute"
> 2008-02-26 05:08:03 GMT NOTICE: CREATE TABLE will create implicit
> sequence "menu_acl_id_seq" for serial column "menu_acl.id"
> 2008-02-26 05:08:03 GMT NOTICE: ALTER TABLE / ADD PRIMARY KEY will
> create implicit index "menu_acl_pkey" for table "menu_acl"
> 2008-02-26 05:08:32 GMT LOG: autovacuum: processing database "ledgersmb"
> 2008-02-26 05:09:32 GMT LOG: autovacuum: processing database "postgres"
> 2008-02-26 05:10:32 GMT LOG: autovacuum: processing database "template1"
> 2008-02-26 05:11:32 GMT LOG: autovacuum: processing database "ledgersmb"
> 2008-02-26 05:12:32 GMT LOG: autovacuum: processing database "postgres"
>
--
Dennis T Kaplan
PzzAzz LLC
Mobile Billboard Advertising
http://www.pzzazz.com
(386) 295-6955