On Sat, Jan 12, 2019 at 12:48 AM Michael Paquier <mich...@paquier.xyz> wrote:
> On Sat, Jan 12, 2019 at 08:34:37AM +0900, Michael Paquier wrote: > > Then the extension is showing up as beginning to be present for other > > users. I am mainly wondering if this case has actually been thought > > about in the past or discussed, and what to do about that and if we > > need to do something. > > The point here is about the visibility in \dx. > If the point is visibility in \dx it seems to me we want to fix the \dx query. This is actually a very interesting set of problems and behavior is not intuitive here in PostgreSQL. I wonder how much more inconsistency we want to add. For example: suppose I create a type in pg_temp and create a table in public with a column using that type. What is the expected visibility in other sessions? What happens to the table when I log out? I went ahead and tested that case and I found the behavior to be, well, unintuitive. The temporary type is visible to other sessions and the column is implicitly dropped when the type falls out of session scope. Whether or not we want to prevent that, I think that having special casing here for extensions makes this behavior even more inconsistent. I guess I would vote against accepting this patch as it is. > -- > Michael > -- Best Regards, Chris Travers Head of Database Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com Saarbrücker Straße 37a, 10405 Berlin