Skip to content


DDC-1224: QueryBuilder delete issues CREATE TEMPORARY TABLE error on PostgreSQL #1832

doctrinebot opened this Issue · 2 comments

2 participants


Jira issue originally created by user kassner:

When I try to issue a delete an Class Table Inheritance Entity using QueryBuilder and I'm using schemas on tablename (for Postgres), I got the following error from postgres:

SQLSTATE[42P16]: Invalid table definition: 7 ERROR: temporary tables cannot specify a schema name

This occurs because Doctrine\ORM\Mapping\ClassMetadataInfo::getTemporaryIdTableName() returns just "$this->table['name'] . 'id_tmp'", and when my entity is declared with @Table(name="feed.tbfeed"), obviously I will got error.

Temporary tables are created in a special schema in Postgres, and I'm thinking to convert the tablename from the class metadata from feed.tbfeed to feed_tb_feed into the getTemporaryIdTableName method with a single strreplace. That works for Postgres, but I don't mind what can happen in another DBMS.

Any suggestions?


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.7 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.