<p>I have a query that works on Postgresql 7.4 but not on Postgresql 8.3 with same database.</p>

<p>Query:</p>

<pre><code>SELECT * FROM login_session WHERE (now()-modified) &gt; timeout;
</code></pre>

<p>Gets the following error:</p>

<pre><code>ERROR:  operator does not exist: interval &gt; integer
LINE 1: ...ELECT * FROM login_session WHERE (now()-modified) &gt; timeout ...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
</code></pre>

<p>Column <code>modified</code> is a <code>timestamp</code> and <code>timeout</code> is an <code>integer</code>.</p>

<p>Is there some settings I need to change on server?</p>

<p>I'm installing an application for a client on new server (ubuntu) so I can't change queries in the application.</p>

There are a lot of changes between 7.4 and 8.3. Some of the most drastic were the removal of some automatic casts.
I suppose the "timeout" is in seconds? If so you could change the query to:
```
```
SELECT
    *
FROM
    login_session
WHERE
    (CURRENT_TIMESTAMP - modified) > (timeout * '1 sec'::interval);
```
```