Unix Technical Forum

=?UTF-8?Q?[_psqlodbc-Bugs-1000477_]_Long_parameters_are_not_parsed_from_initializatio n_string_and_unitialized_options?=

This is a discussion on =?UTF-8?Q?[_psqlodbc-Bugs-1000477_]_Long_parameters_are_not_parsed_from_initializatio n_string_and_unitialized_options?= within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> Bugs item #1000477, was opened at 2005-12-09 15:39 You can respond by visiting: http://pgfoundry.org/tracker/?func=d...oup_id=1000125 Category: None Group: None Status: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 01:38 AM
noreply@pgfoundry.org
 
Posts: n/a
Default =?UTF-8?Q?[_psqlodbc-Bugs-1000477_]_Long_parameters_are_not_parsed_from_initializatio n_string_and_unitialized_options?=

Bugs item #1000477, was opened at 2005-12-09 15:39
You can respond by visiting:
http://pgfoundry.org/tracker/?func=d...oup_id=1000125

Category: None
Group: None
Status: Open
>Resolution: Accepted

Priority: 3
Submitted By: Nobody (None)
>Assigned to: Ludek Finstrle (luf)

Summary: Long parameters are not parsed from initialization string and unitialized options

Initial Comment:

SQLConfigDataSource( NULL,ODBC_CONFIG_DSN,
"PostgreSQL Unicode",
"DSN=Example\0SERVER=localhost\0DATABASE=template1 \0Username=postgres\0UseServerSidePrepare=1\0TextA sLongVarchar=1\0ByteaAsLongVarBinary=1\0\0")

This creates new DSN but options such as ByteaAsLongVarBinary and TextAsLongVarchar are set to -1 instead of 1. Thats because ParseAttributes function in SETUP.C file accepts only keys smaller then 15 characters:

#define MAXKEYLEN (15+1) /* Max keyword length */
char aszKey[MAXKEYLEN];

There are some options much longer than 15 chars an they are not parsed.

In general uninitialized options shouldn't be saved in registry (ODBC.INI) but CC_conninfo_init initializes some options to -1 and they are never updated to proper default values:

// connection.c
CC_conninfo_init(ConnInfo *conninfo)
{
memset(conninfo, 0, sizeof(ConnInfo));
conninfo->disallow_premature = -1; //!!
conninfo->allow_keyset = -1; // !!
conninfo->lf_conversion = -1; // !!
conninfo->true_is_minus1 = -1; // !!
conninfo->int8_as = -101;
conninfo->bytea_as_longvarbinary = -1; //!!
conninfo->use_server_side_prepare = -1; //!!
memcpy(&(conninfo->drivers), &globals, sizeof(globals));
}


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

>Comment By: Ludek Finstrle (luf)

Date: 2005-12-09 23:19

Message:
Please try new development snapshot. Problems may disappear with 8.01.0104.
If you are using ODBC on linux try attached patch.

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

You can respond by visiting:
http://pgfoundry.org/tracker/?func=d...oup_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:52 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com