I need to cast varchar to json using:
CREATE CAST (character varying AS json) WITHOUT FUNCTION as ASSIGNMENT;
Connecting to Postgres with the master account of my RDS Postgres instance, I get the following error
ERROR: must be owner of type character varying or type json
The owner is rdsadmin:
\dT+ varchar
List of data types
Schema | Name | Internal name | Size | Elements | Owner | Access privileges | Description
------------+-------------------+---------------+------+----------+----------+-------------------+-------------------------------------------------------------------
pg_catalog | character varying | varchar | var | | rdsadmin | | varchar(length), non-blank-padded string, variable storage length
Now I don't have rdsadmin password, is there any other way to run this query?
I don't think you can bootstrap your way to the full rdsadmin
privileges.
However it seems that you can make yourself the owner of types:
ALTER TYPE json OWNER TO myowner;
And then you can create casts for that type to your heart's content.
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