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

Closed
opened 2026-01-22 13:17:19 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 22, 2011).

Originally assigned to: @beberlei on GitHub.

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.tb_feed"), 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.tb_feed to feed_tb_feed into the getTemporaryIdTableName method with a single str_replace. That works for Postgres, but I don't mind what can happen in another DBMS.

Any suggestions?

Originally created by @doctrinebot on GitHub (Jun 22, 2011). Originally assigned to: @beberlei on GitHub. 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.tb_feed"), 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.tb_feed to feed_tb_feed into the getTemporaryIdTableName method with a single str_replace. That works for Postgres, but I don't mind what can happen in another DBMS. Any suggestions?
admin added the Bug label 2026-01-22 13:17:19 +01:00
admin closed this issue 2026-01-22 13:17:20 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 26, 2011):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Jun 26, 2011): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Jun 26, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jun 26, 2011): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1538