Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SELECT typarray FROM pg_type WHERE typname = 'citext'

SELECT typarray FROM pg_type WHERE typname = 'citext'

Why I am getting this query in django debug panel and what does it mean? Whenever I navigate to the new page, this query gets run as 1st then all others, same thing in the python shell using connection.queries command. I am using django 1.11 and postgres 9.6.

like image 207
Horion Avatar asked Oct 16 '25 10:10

Horion


1 Answers

citex is a PostgreSQL extension and has no fixed typarray so the following query needs to be executed to query pg_type on Django side to register extension with psycopg2

Why you see this query being executed each time you load page is because it is not cached internally which seems to be sorted for Django 2.0

Also note that following query is not called for Django versions before 1.11 as citext is implemented in Django around version 1.11.

like image 138
iklinac Avatar answered Oct 19 '25 00:10

iklinac



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!