[Devel] [ openser-Bugs-1645475 ] presence module use reserved
postgres term
Klaus Darilion
klaus.mailinglists at pernau.at
Tue Feb 6 13:54:10 CET 2007
Hi!
I have postgresql.sh extended to create all the tables for presence
(after asking the user like done with the serweb tables) - along with
some other postgres fixes.
Is it fine to commit it? Maybe then somebody can copy/paste it into the
mysql file.
regards
klaus
SourceForge.net wrote:
> Bugs item #1645475, was opened at 2007-01-26 19:20
> Message generated for change (Comment added) made by miconda
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1645475&group_id=139143
>
> 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: modules
> Group: ver devel
>> Status: Closed
>> Resolution: Fixed
> Priority: 5
> Private: No
> Submitted By: Klaus Darilion (klaus_darilion)
>> Assigned to: Daniel-Constantin Mierla (miconda)
> Summary: presence module use reserved postgres term
>
> Initial Comment:
> Hi!
>
> Take a look at the xcap_xml table.
>
> CREATE TABLE `xcap_xml` (
> `id` int(10) NOT NULL auto_increment,
> `user` varchar(66) NOT NULL,
> `domain` varchar(128) NOT NULL,
> `xcap` text NOT NULL,
> `doc_type` varchar(64) NOT NULL,
> UNIQUE KEY udd_xcap (`user`,`domain`,`doc_type`),
> PRIMARY KEY (id)
> )
>
>
> 'user' can't be used in postgresql as it is a reserved word. Further, to be consistent with other modules the term "username" should be used.
>
>
>
> ----------------------------------------------------------------------
>
>> Comment By: Daniel-Constantin Mierla (miconda)
> Date: 2007-02-06 14:23
>
> Message:
> Logged In: YES
> user_id=1246013
> Originator: NO
>
> Fixed on CVS.
>
> ----------------------------------------------------------------------
>
> Comment By: Klaus Darilion (klaus_darilion)
> Date: 2007-01-26 19:56
>
> Message:
> Logged In: YES
> user_id=1318360
> Originator: YES
>
> This patch changes user to username (please review)
>
> Index: notify.c
> ===================================================================
> RCS file: /cvsroot/openser/sip-server/modules/presence/notify.c,v
> retrieving revision 1.13
> diff -u -r1.13 notify.c
> --- notify.c 14 Dec 2006 11:47:57 -0000 1.13
> +++ notify.c 26 Jan 2007 17:55:33 -0000
> @@ -1246,7 +1246,7 @@
> str body ;
> xmlDocPtr xcap_tree =NULL;
>
> - query_cols[n_query_cols] = "user";
> + query_cols[n_query_cols] = "username";
> query_vals[n_query_cols].type = DB_STR;
> query_vals[n_query_cols].nul = 0;
> query_vals[n_query_cols].val.str_val.s = user.s;
> @@ -1278,7 +1278,7 @@
> n_query_cols, 1, 0, &result)<0)
> {
> LOG(L_ERR, "PRESENCE:get_xcap_tree:Error while querying
> table xcap for"
> - " [user]=%.*s , domain=%.*s\n",user.len, user.s,
> domain.len, domain.s);
> + " [username]=%.*s , domain=%.*s\n",user.len, user.s,
> domain.len, domain.s);
> goto error;
> }
> if(result== NULL)
> @@ -1287,12 +1287,13 @@
> if(result && result->n<=0)
> {
> LOG(L_ERR, "PRESENCE:get_xcap_tree:The query in table xcap
> for"
> - " [user]=%.*s , domain=%.*s returned no
> result\n",
> + " [username]=%.*s , domain=%.*s returned
> no result\n",
> user.len, user.s, domain.len, domain.s);
> goto error;
> }
> LOG(L_ERR, "PRESENCE:get_xcap_tree:The query in table xcap for"
> - " [user]=%.*s , domain=%.*s returned result",
> user.len, user.s, domain.len, domain.s );
> + " [username]=%.*s , domain=%.*s returned result",
> + user.len, user.s, domain.len, domain.s );
>
> row = &result->rows[0];
> row_vals = ROW_VALUES(row);
>
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1645475&group_id=139143
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
--
Klaus Darilion
nic.at
More information about the Devel
mailing list