[OpenSIPS-Devel] [ opensips-Bugs-2815413 ] osipconsole broken for Postgres support

SourceForge.net noreply at sourceforge.net
Thu Jul 9 22:54:52 CEST 2009


Bugs item #2815413, was opened at 2009-07-01 21:16
Message generated for change (Comment added) made by gordonross
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2815413&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.5.x
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Gordon Ross (gordonross)
Assigned to: Iulia Bublea (iulia_bublea)
Summary: osipconsole broken for Postgres support

Initial Comment:
osipconsole uses the wrong quote character in it's SQL statements. osipconsole uses double quotes to enclose parameters. However, Postgres needs string parameters to be enclosed in single quotes. Double quotes, to postgres, indicate a colum name.

A simple add subscriber in osipconsole:

OpenSIPS$:add 1234 at blah 1234
Used database is PostgreSQL
1234 blah
Entry could not be retrieved from tableERROR:  column "1234" does not exist

	Query results:
================================================

Retrieving user 1234 at blah from dbaliases failedERROR:  column "1234" does not exist

	Query results:
================================================
Alias 1234 at blah does not exist!
Introducing the new user 1234 at blah to subscriber table failedERROR:  column "1234" does not exist


This problem does not exist in opensipctl.That uses single quotes and works fine with Postgres.

# /usr/local/sbin/opensipsctl add 2345 at blah 1234
pgsql_query: /usr/bin/psql  -A -q -t -P fieldsep='	' -h localhost -U opensips opensips -c 'insert into subscriber (username,				domain,ha1,ha1b,password) 			values ('2345','blah','6bc52aec50b4af97f338b0d406234afa','5cb004acd453ef4e8548dfb19ab23ae4','1234');'
new user '2345 at blah' added


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

Comment By: Gordon Ross (gordonross)
Date: 2009-07-09 21:54

Message:
Works fine in trunk now,

Thanks.

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

Comment By: Iulia Bublea (iulia_bublea)
Date: 2009-07-02 11:05

Message:
Hi,

I have fixed this a couple of days ago, when another error was reported.
It has been fixed on 1.5 and also on trunk. Please check if it works for
you now. 


Regards,
Iulia

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

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



More information about the Devel mailing list