<p>I'm trying to do a subselect in pgsql aka postgresql and the example I found doesn't work:</p>

<pre><code>SELECT id FROM (SELECT * FROM table);
</code></pre>

I think you need something like:
```
```
SELECT * FROM table WHERE id IN (SELECT id FROM table2);
```
```
I don't understand what your non-working subquery is attempting to do, it seems like you could just say
```
SELECT id FROM table
```
because presently its not valid SQL92 syntax.