Skip to content
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

Creating database fails, and tries on wrong server if logged into multiple #334

Closed
joachimtingvold opened this issue Sep 9, 2020 · 3 comments

Comments

@joachimtingvold
Copy link

PostgreSQL 9.6.15
phpPgAdmin6 on latest master-branch (16b6650)
nginx/1.18.0
php7.3 (7.3.19-1~deb10u1)

Trying to create a database fails with the following error;

strsqlerror
ERROR: zero-length delimited identifier at or near """"

LINE 1: ...t1" WITH TEMPLATE="template1" ENCODING='UTF-8' TABLESPACE ""

^

SQL:
CREATE DATABASE "kek-test1" WITH TEMPLATE="template1" ENCODING='UTF-8' TABLESPACE ""

image

Additionally, if you are connected to multiple servers, it will attempt to create the database on the server you logged into first.

  1. Log into server1
  2. Log into server2
  3. Try to create database on server2
  4. The creation fails, but shows that it tried to create it on server1

image
image

@joachimtingvold
Copy link
Author

joachimtingvold commented Sep 9, 2020

Video showing the issue (including issue #333 and #335): https://files.jocke.no/debug/phppgadmin6-issues_20200909.mov

@joachimtingvold
Copy link
Author

joachimtingvold commented Sep 9, 2020

Not the best comparison, but this works fine using phpPgAdmin v6.0.0-b28 on PostgreSQL 9.6.10.

@ffflabs
Copy link
Collaborator

ffflabs commented Oct 19, 2020

I see... this one has the same origin 2b72a65
having the collation , encoding and namespace not set, it shouldn't be using those parameters, but it was comparing empty strings with nulls, therefore there wasn't strict equality .

I'm releasing the fix as v.6.1.2

@ffflabs ffflabs closed this as completed Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants