Issue #2 new

INSERTs should succeed without SELECT privilege

Tuukka Norri
created an issue

When creating new objects, BaseTen currently INSERTs a row and then SELECTs it to fetch any defaults and values converted by the database. There are problems with this approach, however, so the following alternative strategy should be implemented instead:

If the current user has the SELECT privilege, INSERT ... RETURNING * should be used as a performance optimization.

If the current user does not have the SELECT privilege, the individual column default values should be SELECTed first, and then used to construct the INSERT query and to populate the database object.

Figuring out whether we have the privilege is ticket <<issue 1>>.