We have a program that transfers cobol data (index files) to a database.
Until now we transferred the data to an oracle database.
In the beginning of the program I logged in with user sys
and then I altered the current schema to ink
. I did this in this way, because ink
has no privileges to create a table.
Then I created a table and the table owner was automatically ink
, not sys
.
We recently have switched databases from Oracle to Postgres.
Here I log in as "postgres", then I switch to the "ink" schema with:
set search_path to 'ink';
Then I create a table and the table owner automatically is postgres
, not ink
.
So this behavior is reverse.
What do I have to do in order to get the same behaviour as with the oracle database:
In my scenario the table owner should automatically be ink
, not postgres
.
It would be nice if I would not have to write
ALTER TABLE ... OWNER TO ink;
after each create table command.