Sidebar Window


Topics



Links





« Cisco and Syslogd | Home | Google Maps »

Webmin 1.290 and Postgres 8.1

By klard | July 23, 2006

As usual any time I try and get something to work I have to figure out a way around some roadblock. At least if I log it here then I can refer back to it when I hit the same stump again. Anyway I was trying to get the full table list from Postgres 8.1 using Webmin 1.290 and I kept getting an error stating ” ERROR: column “oid” does not exist”. So as I am want to do I started searching around on Google with very little luck, finally I decided to delve into the code and figure out the problem. Turns out it is a super simple fix.

Change line 197 of (at least in my case) /usr/local/lib/webmin/postgresql/view_table.cgi from
“select oid,* from $qt $search limit”.

to

“select * from $qt $search limit”.

Simple as that.

Now comes the fun part………..getting all the rest of the functions working without oid….whoop, more on that later.

Actually this doesn’t really work as planned. If you do this, it hides the first column which in my case is the key column. I am working on a better workaround using essentually this function, but, in liu of removing oid changing it to the key value extracted from the schema. The only real problem I can see with this is that your primary key would have to be your first column in all cases. It does however seem to fix the problems with editing and deleting rows individually. I will post the solution once it is complete.

Topics: Postgres, Webmin |

Comments