public inbox for [email protected]
help / color / mirror / Atom feedFrom: Durumdara <[email protected]>
To: Postgres General <[email protected]>
Subject: Listing only the user defined types (with owners)
Date: Thu, 2 May 2024 13:39:36 +0200
Message-ID: <CAEcMXhki9OkNTSzyKZp9ehPOeCCc3J7hiacA_7=jQi4WYywBaQ@mail.gmail.com> (raw)
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 example I have only one user defined type, like "T_TEST", but this
pg_type relation contains the basic data types, other data types, from any
schema.
Do you have a working Query which lists the user defined types with the
owners?
Thank you for your help!
Best regards
dd
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Listing only the user defined types (with owners)
In-Reply-To: <CAEcMXhki9OkNTSzyKZp9ehPOeCCc3J7hiacA_7=jQi4WYywBaQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox