I am trying to create custom data type as below
CREATE TYPE _kitdatatype (
INPUT = array_in,
OUTPUT = array_out,
RECEIVE = array_recv,
SEND = array_send,
ANALYZE = array_typanalyze,
ALIGNMENT = 4,
STORAGE = any,
CATEGORY = A,
ELEMENT = kitdatatype,
DELIMITER = ',');
The database instance is deployed on AWS and I am connecting Postgres user but getting below error.
SQL Error [42501]: ERROR: must be superuser to create a base type
Yes as per postgresql docs you need to be superuser.
To create a new base type, you must be a superuser. (This restriction is made because an erroneous type definition could confuse or even crash the server.)
To make superuser in aws run these commands
create role your_user with password 'your_password' login;
CREATE ROLE
grant rds_superuser to testuser;
GRANT ROLE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With