public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Richard Zetterberg <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: [email protected]
Subject: Re: Changing a varchar(7) domain into text directly in pg_type
Date: Wed, 28 May 2025 10:21:01 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+j-Ktbnuci7HZY0z9b04Uj50Qy1y8dmvj-zZo6vcnbAAEByaQ@mail.gmail.com>
References: <CA+j-KtY71coW3-fn5j87R4eKVoPfaA_98brZskWb3qWi=23Buw@mail.gmail.com>
<[email protected]>
<CA+j-Ktbnuci7HZY0z9b04Uj50Qy1y8dmvj-zZo6vcnbAAEByaQ@mail.gmail.com>
Richard Zetterberg <[email protected]> writes:
> In my head, this change would be instant and postgres would carry on like
> nothing happened and that the domain always had the type `text`. Is this a
> fools errand? Or could it actually make sense in this situation?
Yeah, I think you can probably get away with this (especially since
you've already tested the effects in a throwaway database, IIUC).
The main thing people tend to forget when doing this sort of manual
catalog surgery is updating pg_depend and/or pg_shdepend. But here
there's nothing to do. Since both varchar and text are undroppable
built-in types, we don't bother to make dependencies on them. And
you're not changing the domain's schema or owner, so its other
dependencies don't need to change.
regards, tom lane
view thread (2+ 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], [email protected], [email protected], [email protected]
Subject: Re: Changing a varchar(7) domain into text directly in pg_type
In-Reply-To: <[email protected]>
* 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