#34059: Validation of check constraints on postgres json fields produce invalid 
SQL
-------------------------------------+-------------------------------------
     Reporter:  Dan LaManna          |                    Owner:  David
                                     |  Sanders
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by David Sanders):

 * cc: David Sanders (added)
 * owner:  (none) => David Sanders
 * status:  new => assigned
 * component:  contrib.postgres => Database layer (models, ORM)


Comment:

 Changing component to ORM because this is also an issue with Oracle:

 {{{
 SELECT %s AS "_CHECK"  FROM DUAL WHERE NOT (JSON_EXISTS({"foo": "bar"},
 '$."schemaVersion"') AND COALESCE(JSON_QUERY(%s, '$."schemaVersion"'),
 JSON_VALUE(%s, '$."schemaVersion"')) IS NULL)
 Got a database error calling check() on <Q: (AND: (NOT (AND:
 ('metadata__schemaVersion', None))))>: ORA-00936: missing expression
 }}}

 MySQL & SQLite are fine

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34059#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018382bf5715-9918d231-341f-45de-9dc5-498935e41389-000000%40eu-central-1.amazonses.com.

Reply via email to