[asterisk-users] Error When Using Postgresql Schema With Realtime Sip

Tilghman Lesher tlesher at digium.com
Thu Sep 24 09:10:39 CDT 2009


On Thursday 24 September 2009 05:06:02 stephen.hindmarch at bt.com wrote:
> I have investigated further and found that it is a bug in ODBC, not
> Asterisk. The SQLColumns function, which asterisk uses to describe the
> table, does not return any columns when the table name includes the
> schema specification. You can show this by using isql to do "help table"
> which returns info about all the columns, and then "help public.table"
> which returns nothing. As chan_sip seems to be the only application that
> tests the structure of the table before writing to it this is why
> REGISTER fails.
>
> When I have time I will chase up ODBC and see if the issue is tracked
> there. Do you still want me to raise it as an issue on bugtracker?

Yes, I want you to raise this on the bugtracker, and no, this is not a bug
in ODBC, but a deficiency in my code.  Since you tracked this down to the
code in res_odbc.c, I might as well tell you that the first two NULL sets of
arguments (NULL, 0) are for specifying the catalog and schema, respectively,
of the database table, and it is because I never bothered parsing the schema
out of the tablename that this does not work.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list