On the Postgres console (PSQL) I try to write a simple 'batch' test:
\set oid
\set username 'john'
\set emailadr '[email protected]'
\set password 'jjjj'
INSERT INTO :oid SELECT auc_user_insert(:'username', :'emailadr', :'password');
SELECT auc_user_select(:oid);
SELECT auc_user_delete(:oid);
auc_user_insert, auc_user_select and auc_user_delete are application specific Postgres functions and work fine for each self (within the Query Tool).
The insert Function returns a bigint as unique id, which I would like to assign to the variable oid for usage in the next lines.
But in PSQL for the INTO :oid statement I get the error
ERROR: Relation 'bigint' doesn't exist
What's wrong and what would be the right way to work with such a variable? Thanks for any hint!