﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34955	Make Concat() use the database operator `||` on PostgreSQL.	Paolo Melchiorre	Simon Charette	"The `django.db.models.functions.Concat` database ORM function in the PostgreSQL database backend use the `CONCAT` SQL function.

Unfortunately, the `CONCAT` function in PostgreSQL is not `IMMUTABLE` and cannot be used in functional indexes or generated fields.

For example, if you use `Concat(""first_name"", Value("" ""), ""last_name"")` in a `GeneratedField` you get the following error:

{{{
#!python
psycopg.errors.InvalidObjectDefinition: generation expression is not immutable
}}}

I propose to make the string concatenation operator `||` available in the PostgreSQL database backend in addition to the already available string concatenation function `CONCAT`."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed	field, database, generated, output_field	Simon Charette David Wobrock	Accepted	1	0	0	0	0	0
