Re: Anyway to clear the 'text size' set in the default, freetds.conf file

"[email protected]" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
"James K. Lowden" wrote:
> Looking at the code again, "set text size" isn't sent if the in-memory value is zero.  Can't you specify "text size = 0" in freetds.conf?  If not, it wouldn't be hard to change config.c to look for, say, -1 and set the size to zero there, causing the statement not to be sent. 
>   

I tried this.  According to the TDS dump config file, it finds my login
dir .freetds.conf file, sets the text size to zero, *then* finds the
default config file, and overrides the value I set for myself.   So
maybe this turns into a question of, how can a user's local freetds.conf
file override the default freetds.conf file?  It certainly seems like a
local config file should be able to override the default config file.

> There might be a long-term solution anyway.  
>
> I've been thinking for a while that session properties need to be defined on a per-server basis (or globally).  For instance, it would be nice if db-lib applications could have ANSI defaults set on by, er, default.  That would among other things let them use indexed views without doing anything special.  
>
> The natural place for it would be freetds.conf.  The "right" way to do it would be to introduce a panaply of options that the library would convert to SET statements, to be sent immediately upon logging in.  The cheap way would be to point to a file containing SQL text to send after logging in.  (I don't see SQL in freetds.conf itself as an option because it lacks a line-continuation syntax.)  
>
> This could be used for set textsize, too.  
>
> --jkl
>   

As a person with no skin in the FreeTDS development/maintenance game
(just a user ;), I vote for doing it the "right" way.

Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.