TextField in Oracle: any alternatives?

13 views
Skip to first unread message

Robert Martin

unread,
Jul 10, 2015, 4:13:45 PM7/10/15
to django...@googlegroups.com
Hi all,

I have a question about best practices with storing strings in an Oracle DB. I've grown accustomed to using TextFields wherever possible, as I mainly work in Postgres and this seems to be recommended:


However, I'm trying to migrate a project to Oracle and finding that my TextFields are now being stored as CLOBs. This is not really ideal, as I can't use them (easily) in SQL queries and it just seems like overkill for short, variable-length strings. If I weren't using Django I would store these as varchars, and I guess I could make them all CharFields, but I hate to have my models be so closely coupled to the DB.

Has anyone else come up with a more elegant solution for this? Would CharField(max_length=255) be a good compromise?

Thanks!
Reply all
Reply to author
Forward
0 new messages