Hi, I am trying to build a user database. The steps for creating a new user are: 1. Use gen_salt to create a salt. 2. Compute the hash based on the salt and password and store both the hash and the salt into a new row. The pl/pgsql would look like this: CREATE OR REPLACE FUNCTION system.create_enduser(IN emailArg TEXT, IN passwordArg TEXT, IN nicknameArg TEXT, IN roundsArg int) RETURNS TEXT AS Is there a way to do this in a single SQL statement without using a function? One way I can think of is using trigger, but that still requires another setup. Appreciate any help. -- Regards Ryan |