English 中文(简体)
show executed query in phpPgAdmin
原标题:

Is there a way to show the SQL query executed by phpPgAdmin as the way phpMyAdmin does? For example, if I modify a column, it should show the ALTER command being executed.

If this is not possible, what other interface could I use to get this feature?

最佳回答

It s not possible with any currently released version of phpPgAdmin, although the feature could probably be added. You d need to intercept the SQL being sent to the back-end, and then display this back out to the user. SQL execution is pretty well centralized, and if you look at the "history" feature you will see a way to trap/show queries, so munging those bits together would probably get you what you want. HTH, if someone implements this, please send a pull request!

问题回答

As a quick dirty hack you could alter sources a bit to enable sql logging: In classes/database/ADODB_base.php in

function execute($sql) {
...
}

add these lines at the beginning:

global $misc;
$misc->saveScriptHistory($sql);

This worked in my 5.0.3 version.





相关问题
摘录数据

我如何将Excel板的数据输入我的Django应用? I m将PosgreSQL数据库作为数据库。

Postgres dump of only parts of tables for a dev snapshot

On production our database is a few hundred gigabytes in size. For development and testing, we need to create snapshots of this database that are functionally equivalent, but which are only 10 or 20 ...

How to join attributes in sql select statement?

I want to join few attributes in select statement as one for example select id, (name + + surname + + age) as info from users this doesn t work, how to do it? I m using postgreSQL.

What text encoding to use?

I need to setup my PostgreSQL DB s text encoding to handle non-American English characters that you d find showing up in languages such as German, Spanish, and French. What character encoding should ...

SQL LIKE condition to check for integer?

I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts with the letter "A": SELECT * ...

热门标签