New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp tables should not be opened automatically #350

Closed
qwesda opened this Issue Mar 22, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@qwesda

qwesda commented Mar 22, 2017

When postico tries to restore the previous table view it should not try to switch to a table in the pg_temp schema since it won't be there (or not accessible).

@jakob jakob modified the milestones: v1.1.2, v1.1.3 Mar 22, 2017

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Mar 23, 2017

Owner

I've started to work on this:

https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1616.zip

There is a minor issue remaining: the left sidebar width is restored incorrectly when the right sidebar was opened. I need to have a look at this.

Owner

jakob commented Mar 23, 2017

I've started to work on this:

https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1616.zip

There is a minor issue remaining: the left sidebar width is restored incorrectly when the right sidebar was opened. I need to have a look at this.

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda Mar 23, 2017

The 1616 build seems to behave identically to the 1.1.1 version.

steps to reproduce

  • open db
  • run create temp table query
  • reload connection
  • switch to temp table
  • hit cmd + t or cmd + alt + n -> yellow warning message Could not load table rows. Query failed PostgreSQL said: cannot access temporary tables of other sessions

expected behavior

  • the new window/tab opens the same view as if the db was opened from the favorites window, i.e.
    the db overview

qwesda commented Mar 23, 2017

The 1616 build seems to behave identically to the 1.1.1 version.

steps to reproduce

  • open db
  • run create temp table query
  • reload connection
  • switch to temp table
  • hit cmd + t or cmd + alt + n -> yellow warning message Could not load table rows. Query failed PostgreSQL said: cannot access temporary tables of other sessions

expected behavior

  • the new window/tab opens the same view as if the db was opened from the favorites window, i.e.
    the db overview
@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Mar 24, 2017

Owner

Thanks for the detailed follow-up. Now I understand -- I thought you were talking about window restoration after quitting and restarting Postico, which was also broken.

Since I usually connect with a superuser for testing, I wasn't aware of the issue you described (a superuser can access temp tables from another session).

Anyway, I've now also fixed the issue when using the "new window" or "new tab" commands.

Please try the release candidate build from issue #354 and let me know if it now works as expected!

Owner

jakob commented Mar 24, 2017

Thanks for the detailed follow-up. Now I understand -- I thought you were talking about window restoration after quitting and restarting Postico, which was also broken.

Since I usually connect with a superuser for testing, I wasn't aware of the issue you described (a superuser can access temp tables from another session).

Anyway, I've now also fixed the issue when using the "new window" or "new tab" commands.

Please try the release candidate build from issue #354 and let me know if it now works as expected!

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda Mar 25, 2017

works as expected for me now.

Is this behavior special-cased for superuser connections? While this is not how I use temp tables maybe some people would appreciate the old behavior if they use superuser connections ...

qwesda commented Mar 25, 2017

works as expected for me now.

Is this behavior special-cased for superuser connections? While this is not how I use temp tables maybe some people would appreciate the old behavior if they use superuser connections ...

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Mar 25, 2017

Owner

I made no special case for superuser connections.

I didn't think much about this case before, but now that I did I don't think opening temp tables from a second connection is something you should do, even with a superuser. You can still do it explicitly by right-clicking and holding down the cmd-key and selecting "open contents/structure in new window".

But the default behavior should be that temp tables only appear on the connection that they were created on.

Anyway, thanks for bringing this case to my attention; your frequent input is invaluable!

Owner

jakob commented Mar 25, 2017

I made no special case for superuser connections.

I didn't think much about this case before, but now that I did I don't think opening temp tables from a second connection is something you should do, even with a superuser. You can still do it explicitly by right-clicking and holding down the cmd-key and selecting "open contents/structure in new window".

But the default behavior should be that temp tables only appear on the connection that they were created on.

Anyway, thanks for bringing this case to my attention; your frequent input is invaluable!

@jakob jakob closed this Mar 27, 2017

@qwesda

This comment has been minimized.

Show comment
Hide comment
@qwesda

qwesda commented Mar 28, 2017

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment