Hi,

I ran manage.py inspectdb on an existing PostgreSQL database and have
some questions on the results.

Three of the tables use the tsearch2 module which defines a 'tsvector'
data type (to create a searchable text index).  Currently, the PHP app
is unaware of the existence of these columns, except in a single module
that implements the search capability.  inspectdb mapped the tsvector
type to a Django TextField.  My question:  is it necessary to specify
this column/field as part of the Django model, considering that it will
be used only in a couple of internal SQL queries?

The database uses the CHAR(n) (or CHARACTER(n)) datatype in several
places, i.e., a fixed length character type, typically for very short
"code" type columns.  inspectdb also mapped those to TextFields
indicating it was a guess.  Can I remap them to CharField(maxlength=n)
or will that have unintended side-effects (and why is inspectdb unaware
of CHAR types?).

One of those CHAR(n) types used to be a MySQL date type, but we had to
convert to CHAR(10) (i.e., YYYY-MM-DD) because some dates accepted by
MySQL were invalid as far as PgSQL was concerned.  The column is used
for a "publication date".  Such a date has full day, month, year when it
refers to a daily publication like a newspaper or online article, but it
may have only month and year for a monthly magazine or just a year for a
book.  MySQL allows zeros for the missing elements, but PgSQL said those
were invalid dates.  I'd like to know if the Django DateField conforms
to PgSQL or MySQL in this respect and whether it could be used for these
publication dates.

I notice that Django has a URLField.  Our database has several 'url'
columns, but most of them have been entered without the
'http://' (unless the URL is for an https) since the app provides that
default where necessary.  Is URLField compatible with that behavior?

Thanks for your assistance.

Joe


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to