obadiah87 / dbkiss

Automatically exported from code.google.com/p/dbkiss
0 stars 0 forks source link

SQL Output window won't display data with Postgres 9.x #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open the "Execute SQL" or "Popup" SQL window in Dbkiss 1.14 with postgres 
9.1x
2. Enter a simple sql command that should return data (eg. SELECT 
CURRENT_TIMESTAMP;)
3. Click the "Execute" button.

What is the expected output? What do you see instead?
The expected output should include the data output rows.   Executing the above 
command will display the folowing report, but NO data rows (a timestamp):
Query 1: SELECT CURRENT_TIMESTAMP
1 rows affected. Time: 0.000 sec

What version of the product are you using? On what operating system?
I am using dbkiss version 1.14.
I get the same result on Linux Mint 14 and Slitaz 4.0 with Postgres 9.1.

Please provide any additional information below.
 I can display SQL code and select output just fine in PgAdmin3.
The issue does not occur in  Postres 8.x and Ubuntu 12.04.

Original issue reported on code.google.com by pmcgo...@gmail.com on 16 Feb 2013 at 1:09

GoogleCodeExporter commented 8 years ago
I've tested the query and it works fine for me.
Using dbkiss 1.14, Postgresql 9.2.2, Windows 7.

Did you try upgrading Postgresql to 9.2? What is your exact
version of Postgresql? 9.1.x?

Attaching screenshot.

Original comment by czarek.t...@gmail.com on 16 Feb 2013 at 4:06

Attachments:

GoogleCodeExporter commented 8 years ago
I'm suspecting that this is some kind of bug that was introduced in
Postgresql 9.1 and was fixed in 9.2. If you can't upgrade to 9.2,
have at least check whether you use the latest 9.1 version.

Original comment by czarek.t...@gmail.com on 16 Feb 2013 at 4:08

GoogleCodeExporter commented 8 years ago
What is your PHP version? I was testing using PHP 5.4.10.

Original comment by czarek.t...@gmail.com on 16 Feb 2013 at 4:10

GoogleCodeExporter commented 8 years ago
I was running Postgres 9.1.6 and PHP Version 5.4.6-1ubuntu1.1 on my Linux Mint 
14 box. I ran apt-get update then upgrade on my entire system.  It upgraded 
Postgres to 9.2.3 but oddly PHP stayed the same (via phpinfo).  It was also odd 
that phpinfo reported that my postgres was still at 9.1.6.

The Slitaz 4.0 distro was running Postgres 9.1.2 and PHP version 5.2.17.   I 
was not able to install postgres 8.3.9 on Slitaz 3.0.  If you want I can try 
Slitaz 3.0 running Postgres 8.3.9 to see if I can reproduce this issue.  Then I 
could send you both .iso files so you can see the difference.

Original comment by pmcgo...@gmail.com on 16 Feb 2013 at 10:09

GoogleCodeExporter commented 8 years ago
I had both Postgres versions installed and version 9.2.3 was running on port 
5433, since 9.1.6 was on 5432, so I need to sort this out first and get to 
9.2.3.

Original comment by pmcgo...@gmail.com on 16 Feb 2013 at 11:37

GoogleCodeExporter commented 8 years ago
I installed Postgres-9.2.3, postgresql-client-9.2.3 and 
libpostgresqlclient-9.2.3 with php-5.2.17 on Slitaz 4.0 but still had the same 
issue.

Original comment by pmcgo...@gmail.com on 21 Feb 2013 at 12:59

GoogleCodeExporter commented 8 years ago
That is very strange. Does it make a difference when you run 2 queries?
Are you sure you did not modify the dbkiss script?

Can you post a screenshot of your query? Also have a look into html source
code generated, see if there is some php error printed that is not visible
on a page but might be visible in html sources.

Original comment by czarek.t...@gmail.com on 21 Feb 2013 at 3:58

GoogleCodeExporter commented 8 years ago
I've installed Postgresql 9.1, PHP 5.3.10 and DBKiss 1.14 on Ubuntu
12.04 LTS 32-bit and can confirm this issue, no data rows are displayed
for queries in the SQL editor.

Original comment by czarek.t...@gmail.com on 5 May 2013 at 11:01

GoogleCodeExporter commented 8 years ago

Original comment by czarek.t...@gmail.com on 5 May 2013 at 11:01

GoogleCodeExporter commented 8 years ago
It seems that the behavior of pg_affected_rows() has changed in 
Postgresql 9, in Postgresql 8 it returned always 0 for SELECT 
queries and value >= 0 for UPDATE or DELETE queries. In Postgresql 9
it returns the number of affected rows for SELECT queries and that's 
why DBKiss script was confused and treated it like an UPDATE or 
DELETE query and didn't display no rows for it, as it didn't expect
any.

Original comment by czarek.t...@gmail.com on 5 May 2013 at 11:11

GoogleCodeExporter commented 8 years ago
Here is the corresponding bug on bugs.php.net website:
https://bugs.php.net/bug.php?id=61266
It won't be fixed, as it's a bug in libpq.

Original comment by czarek.t...@gmail.com on 5 May 2013 at 11:20

GoogleCodeExporter commented 8 years ago
Fixed in revision 78ec0aaea4b6.
Version 1.15 released, go to Downloads.

Original comment by czarek.t...@gmail.com on 5 May 2013 at 11:31