Thom Brown writes:
> On Thu, 2 May 2024 at 12:40, Durumdara wrote:
>> Do you have a working Query which lists the user defined types with the
>> owners?
> You can always cheat and copy what psql does when you tell it to list all
> user types with extended output (\dt+):
If you want to look at w
On Thu, 2 May 2024 at 12:40, Durumdara wrote:
> Hello!
>
> I have a script which can change the table owners to the database owner.
>
> I select the tables like this:
>
> FOR r IN SELECT tablename FROM pg_tables WHERE (schemaname = 'public')
> and (tableowner <> act_dbowner)
> LOOP
> ...
Hi
You can find all user defined types with the following query.
CREATE TYPE bug_status AS ENUM ('new', 'open', 'closed');
SELECT typname
FROM pg_catalog.pg_type
JOIN pg_catalog.pg_namespace
ON pg_namespace.oid = pg_type.typnamespace
WHERE
typtype = 'e' and nspname NOT IN ('pg_catalog', 'inf
Hello!
I have a script which can change the table owners to the database owner.
I select the tables like this:
FOR r IN SELECT tablename FROM pg_tables WHERE (schemaname = 'public')
and (tableowner <> act_dbowner)
LOOP
...
For types I found pg_type, but this contains all types.
For exa