Does PostgreSQL 9.2+ provide any functionality to make it possible to generate a sequence that is namespaced to a particular value? For example:
.. | user_i
Yes:
CREATE TABLE your_table ( column type DEFAULT NEXTVAL(sequence_name), ... );
More details here: http://www.postgresql.org/docs/9.2/static/ddl-default.html