Out of control "regclass" queries in Postgres

[expired user #9074]'s profile image [expired user #9074] posted 9 years ago in General Permalink

Using a Postgres database and it seems that in recent builds (I don't remember this happening much previously) there are many frequent of these "regclass" queries showing up in the log, like that below:

SELECT 7780685::regclass;

The same one will be logged multiple times over and over, and it seems to happen when I switch tabs, when I run queries, etc. Take a look at my attached screenshot and you'll see what I mean about "out of control". I don't know what triggers them or why it's begun to happen so frequently (and why it's the same one over and over.)

1 attachment(s):
  • regclass
ansgar's profile image ansgar posted 9 years ago Permalink

See this thread

That SELECT xyz:regclass is for finding out the table name of a column name in a result set. This is important for the "Export grid data" dialog, in which you can export "SQL Inserts". If Heidi won't fire these regclass queries, the exported INSERTs would have no table name, e.g. INSERT INTO ? (col1) VALUES ('something').

The only issue here is that these regclass results could be cached by HeidiSQL internally, so it doesn't have to fire the same query over and over again. Though it should be a very quick query, isn't it?

[expired user #9074]'s profile image [expired user #9074] posted 9 years ago Permalink

Hm, I see. Yes, they are fast, I was just surprised by the new behavior. And it seems strange that they are triggered so frequently for the same column name without taking any action (usually just switching query tabs seems to trigger it, and it'll look up the same table multiple times.) Caching would help. But yeah, not a big problem.

Please login to leave a reply, or register at first.