In RDS-postgresql, I would like to register the following user-defined functions, but I do not have superuser privileges, so I get an error.
db=>CREATE OR REPLACE FUNCTION "public".bitpoint4(bit) RETURNS int4AS'bitpoint4'LANGUAGE'internal';
ERROR:permission denied for language internal
If you don't give the rdsadmin role, the above doesn't seem to be successful, but RDS doesn't seem to be able to give the rdsadmin role either.
rds-db=>grant rdsadmin to postgres;
ERROR:must be superuser to alter superusers
I'm sorry, but if you know the workaround, could you please let me know?
aws postgresql
I was able to do this by rewriting it to the same content in plpgsql and defining it.
CREATE OR REPLACE FUNCTION square_root (precision bit) RETURNS int AS$$
BEGIN
RETURN precision;
END;
$$ LANGUAGE plpgsql;
© 2024 OneMinuteCode. All rights reserved.