Tengo una base de datos postgres local. Estoy tratando de ejecutar un comentario simple en el comando con connection.execute . Por ejemplo,
import sqlalchemy as sa db_url = DB_URL db_engine = sa.create_engine(db_url) conn = db_engine.connect() conn.execute('create schema test') conn.execute('create table test.testing as (select 1 as value)') conn.execute("comment on table test.testing is 'this is my table'") Esto realmente crea una tabla test.testing en mi base de datos local, pero cuando ejecuto lo siguiente:
select * from pg_description join pg_class on pg_description.objoid = pg_class.oid join pg_namespace on pg_class.relnamespace = pg_namespace.oid where pg_namespace.nspname = 'test' and pg_class.relname = 'testing'En realidad, no se devuelven filas.