> >i think it's your client (psql) what's actually crashing. it's attempting
>
> Yes it is. But without using a cursor (and even if this kind of query isn't
> recommended) is there any solution to limit the use of the memory by PG itself
> (as for Oracle) ?
if you want to limit memory usage of psql (the client program), use
standard *nix tools - there isn't anything i know about in config etc...
if you want to limit memory usage of postgresql server itself, use
configuration parametrs shared_buffers and sort_mem. see:
http://www.postgresql.org/idocs/index.php?runtime-config.html
kuba