How to delete a table in PostgreSQL that includes double quotes in its name

I accidentally created a table in PostgreSQL that contains several double quotes in its name. I used SQL Server 2000 DTS to import data from my PostgreSQL server, but upon import it created a table but with double quotes in it.

Actually the name of the table when I do

SELECT * FROM pg_tables
:
public "," t_freemailer

So, when I try to dump a table using something like:

DROP TABLE "public". "Public", "t_freemailer"

I get an error: ERROR: table "public" does not exist

And I did not find a way to avoid double quotes in the identifiers name.

Please, help

+3
2

2 x double quote = quote...

DROP TABLE "public". "public" "," t_freemailer "

+2

"" :

DROP TABLE "public"."public"",""t_freemailer"

+4

Source: https://habr.com/ru/post/1716349/


All Articles