9

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?

Jesse Beder
  • 33,081
  • 21
  • 109
  • 146
juanefren
  • 2,818
  • 6
  • 32
  • 41

2 Answers2

1

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.

biomancer
  • 1,284
  • 1
  • 9
  • 20
1

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!

xzilla
  • 1,142
  • 9
  • 19