Skip to content

ntext - sql server #3039

Closed
Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot
Collaborator

Migrated issue, originally created by Landon Neale (@lneale)

In SQL Server 2012, the ntext has been deprecated; however, for sql alchemy 0.9.4 for p2.7, it still uses the ntext in the mssql dialects which causes issues/sql type errors. Found solution in C:\Python2732\Lib\site-packages\sqlalchemy-0.9.4-py2.7.egg\sqlalchemy\dialects\mssql\base.py and replacing references to nvarchar.


Attachments: 3039.patch

Activity

sqlalchemy-bot

sqlalchemy-bot commented on May 2, 2014

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

what type does SQL Server 2012 offer for arbitrarily large text that is unicode ? NVARCHAR is a fixed size; unless SQL Server 2012 allows arbitrary-sized NVARCHAR that's not an option.

sqlalchemy-bot

sqlalchemy-bot commented on May 2, 2014

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • changed milestone from "0.9.4" to "0.9.5"
sqlalchemy-bot

sqlalchemy-bot commented on May 2, 2014

@sqlalchemy-bot
CollaboratorAuthor

Landon Neale (@lneale) wrote:

http://technet.microsoft.com/en-us/library/ms187993.aspx

nvarchar is a variable length type

sqlalchemy-bot

sqlalchemy-bot commented on May 2, 2014

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

OK so this is TEXT also and they want to use varchar(max).

However, this means that the Text()/ UnicodeText() types just shouldn't be used with SQL Server. You can instead use String()/Unicode(), which will render as "varchar(max)" / "nvarchar(max)" right now if you don't give them a length.

As it stands, changing Text/UnicodeText to spit out (n)varchar(max) seems like it would be pretty backwards incompatible/surprising for existing users.

sqlalchemy-bot

sqlalchemy-bot commented on May 19, 2014

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

this is going to surprise people so it'll be for 1.0

sqlalchemy-bot

sqlalchemy-bot commented on May 19, 2014

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • attached file 3039.patch
sqlalchemy-bot

sqlalchemy-bot commented on May 19, 2014

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • removed labels: low priority
sqlalchemy-bot

sqlalchemy-bot commented on May 19, 2014

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • changed milestone from "0.9.5" to "1.0"
sqlalchemy-bot

sqlalchemy-bot commented on Dec 6, 2014

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

  • SQL Server 2012 now recommends VARCHAR(max), NVARCHAR(max),
    VARBINARY(max) for large text/binary types. The MSSQL dialect will
    now respect this based on version detection, as well as the new
    deprecate_large_types flag.
    fixes ntext - sql server #3039

c8817e6

sqlalchemy-bot

sqlalchemy-bot commented on Dec 6, 2014

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
added this to the 1.0 milestone on Nov 27, 2018

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQL ServerMicrosoft SQL Server, e.g. mssqlbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sqlalchemy-bot

        Issue actions

          ntext - sql server · Issue #3039 · sqlalchemy/sqlalchemy