[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add user in 1.3.43rc1

I tried 1.3.43rc2.  I got past the employee__save, although I had
two ghost postgres accounts half-created that I should have cleaned up first.
I'll try again after dropping all the roles, but see the bottom of this email.

I then got, in the edit function of the main system, trying to clean stuff
up, no function employee__get, so I decided to do:

ostgres@money13:/usr/share/ledgersmb$ psql credilorg
psql (9.1.13)
Type "help" for help.

credilorg=# \i sql/modules/Employee.sql

and I got:

psql:sql/modules/Employee.sql:126: ERROR:  syntax error at or near "."
LINE 7:           ee.startdate, ee.enddate, ee.role, ee.ssn, ee.sale...
psql:sql/modules/Employee.sql:130: ERROR:  function employee__get(integer)
does not exist
psql:sql/modules/Employee.sql:155: ERROR:  return type mismatch in function
declared to return employee_result
DETAIL:  Final statement returns date instead of boolean at column 7.

looking deeper, I found the missing trailing ,

mcr@money13:/usr/share/ledgersmb$ git diff !$
git diff sql/modules/Employee.sql
diff --git a/sql/modules/Employee.sql b/sql/modules/Employee.sql
index ff6b454..8db9dd2 100644
--- a/sql/modules/Employee.sql
+++ b/sql/modules/Employee.sql
@@ -114,7 +114,7 @@ CREATE OR REPLACE FUNCTION employee__get
 returns employee_result as
    SELECT p.entity_id, p.id, s.salutation,
-          p.first_name, p.middle_name, p.last_name, ee.is_manager
+          p.first_name, p.middle_name, p.last_name, ee.is_manager,
           ee.startdate, ee.enddate, ee.role, ee.ssn, ee.sales,
           mp.first_name, mp.last_name, ee.employeenumber, ee.dob,
      FROM person p

{I wonder if I should just upgrade from 1.2 to 1.4. An upgrade that skips a
version is usually a bad idea, but maybe it's better tested... I suspect that
many might still be at 1.2 due to fears about 1.3 stability...}

It's also very hard to see the errors due to the verbosity, or even know
where the errors are going during the upgrade process.  Best I have done is:
  postgres@money13:/tmp/ledgersmb$ tail -f * | grep ERROR

===== this is what I get from the AddUser page:

Conflict with Existing Data. Perhaps you already entered this?
More information has been reported in the error logs

I understand the whole import user part; if I say "Yes", then it won't
create a new database user.  But I'm rather unclear what other info
I need to supply, and I think that if I've just dropped that database role,
then I shouldn't hit import.

And more information doesn't get reported.
Aha, it's in error.log:

==> /var/log/apache2/error.log <==
DETAIL:  Key (username)=(mcr) already exists.
CONTEXT:  SQL statement "insert into users (id, username, entity_id) VALUES (
PL/pgSQL function "admin__save_user" line 49 at SQL statement

After futzing around with creating a second user, I tried to edit the
original "mcr" user and got:


22P02:ERROR: invalid input syntax for type boolean: "manager"
LINE 1: ...12-30', NULL, NULL, 'user', NULL, '1', NULL, '2', 'manager') ^

from: ... well, doesn't help, it the URL hasn't changed.

]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     ..hidden..  http://www.sandelman.ca/        |   ruby on rails    [

Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
Ledger-smb-devel mailing list