freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Two issues with defncopy
- Date: Thu, 3 Jul 2014 19:43:05 -0400
On Thu, 3 Jul 2014 09:29:58 -0500
Nem W Schlecht <nem AT emptec.com> wrote:
> Since syscomment is a deprecated table, defncopy really should be
> updated to to use either:
> EXEC sp_helptext 'procowner.procname';
> or
> SELECT OBJECT_DEFINITION(OBJECT_ID('procowner.procname'))
Hello Nem, and thanks for your careful work.
When defncopy was new, SQL Server 2005 was still in the future.
Selecting from syscomments is what Sybase's utility did (and would
still have to do on Sybase servers).
As I remember, a word could be split across two rows. The logic should
probably leave (at least one of) the trailing blanks in place, and
stitch the rows together.
Agreed OBJECT_DEFINITION is a better choice now if available. defncopy
could probe for it and fall back on syscomments if it's not there.
That's would be a service to the FreeTDS community and more worthwhile
than fixing the 0.5% errors associated with syscomments.
In re UTF-8, I have to guess some of your DDL contains non-ASCII
characters, and defncopy assumes a character is 1 byte. Your 2x fix
will work until someone has column names in ancient Chinese. Han
Dynasty objects never fail to surprise.
Happy hacking.
--jkl
-
[freetds] Two issues with defncopy,
Nem W Schlecht, 07/03/2014
- Re: [freetds] Two issues with defncopy, James K. Lowden, 07/03/2014
Archive powered by MHonArc 2.6.24.