[OpenSIPS-Devel] [ opensips-Bugs-3486381 ] db_postgres key word as column name handling

SourceForge.net noreply at sourceforge.net
Fri Feb 10 11:55:24 CET 2012


Bugs item #3486381, was opened at 2012-02-09 12:06
Message generated for change (Settings changed) made by vladut-paiu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3486381&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: modules
Group: trunk
Status: Open
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Vladut-Stefan Paiu (vladut-paiu)
Summary: db_postgres key word as column name handling

Initial Comment:
sipcapture uses a column name authorization which in postgresql is a reserved word. I made it work by changing the column name to auth.
Postgresql uses double-quotes to identify a "delimited identifier or quoted identifier" (http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html).
 "A delimited identifier is always an identifier, never a key word."
It can be used on table names column names index names etc.
It solves other problems such as capitals in names as well.
MySQL uses ` (back tick) for the same thing. I don't know about other databases.

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

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



More information about the Devel mailing list