TableExists and PostgresSql
Posted: 04.02.2011, 17:16
Hi
With PgSql 8.4, Lazarus 0.28, TableExists returns to me always FALSE even when the table exists.
With MySql 5, and the same code, it works fine.
I have also tried GetTableNames, but it returns only meta-table from the catalog postgres database, and no table from the currently connected database. This can explain the initial issue...
Is it known, or what could I do to make it working ?
Maybe a SELECT expression could give me the right result. I did it with MySql before I discovered the Exists function, but I'm new to pgSql and don't find the exact database and table to query with it.
Thanks for your help !
Tintinux
With PgSql 8.4, Lazarus 0.28, TableExists returns to me always FALSE even when the table exists.
With MySql 5, and the same code, it works fine.
I have also tried GetTableNames, but it returns only meta-table from the catalog postgres database, and no table from the currently connected database. This can explain the initial issue...
Is it known, or what could I do to make it working ?
Maybe a SELECT expression could give me the right result. I did it with MySql before I discovered the Exists function, but I'm new to pgSql and don't find the exact database and table to query with it.
Thanks for your help !
Tintinux