[OpenSIPS-Devel] [ opensips-Bugs-3065004 ] ocp_admin_privileges.pgsql error

SourceForge.net noreply at sourceforge.net
Mon Sep 13 05:09:46 CEST 2010


Bugs item #3065004, was opened at 2010-09-12 23:06
Message generated for change (Settings changed) made by jrudolph75
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3065004&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
Group: 1.6.x
>Status: Deleted
Resolution: None
Priority: 5
Private: No
Submitted By: jrudolph (jrudolph75)
Assigned to: Nobody/Anonymous (nobody)
Summary: ocp_admin_privileges.pgsql error

Initial Comment:
the script ocp_admin_privileges.pgsql creates errors with latest psql version 8.4.4

The first problem:
ERROR:  relation "admin_id_seq" already exists
ERROR:  syntax error at or near "("
LINE 2:   id int(10) integer Primary KEY DEFAULT nextval(admin_id_se...
                ^
SET

Removing the int(10) before the integer declaration moves past this error.

After int(10) removed:

ERROR:  relation "admin_id_seq" already exists
ERROR:  column "admin_id_seq" does not exist
SET

This was ran against a fresh database install with the only previous entry being "opensipsdbctl create"


The complete script as delivered in the 1.6.3 tarball:

CREATE SEQUENCE admin_id_seq;
CREATE TABLE ocp_admin_privileges (
  id int(10) integer Primary KEY DEFAULT nextval(admin_id_seq),
  first_name text NOT NULL default '',
  last_name text NOT NULL default '',
  username text NOT NULL default '',
  password text NOT NULL default '',
  ha1 text default '',
  available_tools text NOT NULL default '',
  permissions text default NULL
);
SET CLIENT_ENCODING TO 'latin1' ;

----------------------------------------------------------------------

>Comment By: jrudolph (jrudolph75)
Date: 2010-09-12 23:09

Message:
problem is the int(10). the previous create sequence works the first time
it is executed, but stops due to error on the second line. After this the
previously created sequence must be manually deleted before the script can
be ran again.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3065004&group_id=232389



More information about the Devel mailing list