#34955: Make available the string concatenation operator `||` for PostgreSQL
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: field, database, | Triage Stage:
generated, output_field | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Paolo Melchiorre):
Replying to [comment:3 Mariusz Felisiak]:
> > ... databases does not apply.
>
> I don't understand why TBH.
''You quoted my sentence so much that I had to go and reread it :-D''
> Do you want to say that it doesn't apply because it's PostgreSQL and we
should treat it specially? I would argue with that.
My intention was not to ask for special treatment for PostgreSQL, but on
the contrary to ask that it not be the only one treated differently in
this particular case.
I tried to explain that the `||` operator is not a function, but an
operator, and that among other things it has already been used in other
supported backend databases, so requesting that it ALSO be used in
PostgreSQL doesn't seem right to me. a special request.
> This is definitively not a bug. `Concat()` is implemented this way from
the very beginning and database limitations for `GeneratedField` are
[https://docs.djangoproject.com/en/dev/ref/models/fields/#generatedfield
documented].
I don't know the reasons for using `CONCAT` instead of `||`, but I
reiterate that this choice was already a problem for functional indexes,
and now generated fields have been added. It therefore seems to me that
that choice can at least be reevaluated.
''Note: I realize that explaining myself in writing in English could be a
limitation of mine, and in case what I write is misunderstood or arrogant,
I reiterate here that this is not my intention. :-)''
--
Ticket URL: <https://code.djangoproject.com/ticket/34955#comment:6>
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/0107018baf53f361-18802c83-5a83-415f-90be-fb35ef124aab-000000%40eu-central-1.amazonses.com.