In addition to the answer to your duplicate posting -
http://www.thescripts.com/forum/thread592201.html
- you can consider using a file system facilities (that is if you' running on a UNIX platform which has a support for per-user disk quota)
Provided that /dbdata is a quota-enabled partition you can try something like this:
-
CREATE TABLESPACE dbspace LOCATION '/dbdata';
-
CREATE DATABASE db_dbuser OWNER dbuser TABLESPACE dbspace;
-
See the Postgres manual, CREATE TABLESPACE and CREATE DATABASE for details.
I don't like this approach, because if you run out of disk space and cannot commit a transaction you may have to do some work to recover the database.