Обсуждение: pgAdmin III: error while browsing schema of PG database
Hi,
If one clicks on Postgres (non EDB) database and tries to expand the schema tab, then the current git head spits out an error. The offending query contains the following comparison
protype = 1;
protype is of type char, so it expects the RHS to be a char. However this works ok against an EDB database. Anyways, the fix is to compare protype with '1'. This sql works fine on both flavours of databases. Fixing this at all relevant locations.
Regards,
Nikhils
If one clicks on Postgres (non EDB) database and tries to expand the schema tab, then the current git head spits out an error. The offending query contains the following comparison
protype = 1;
protype is of type char, so it expects the RHS to be a char. However this works ok against an EDB database. Anyways, the fix is to compare protype with '1'. This sql works fine on both flavours of databases. Fixing this at all relevant locations.
Regards,
Nikhils
Вложения
Le 07/02/2011 13:01, Nikhil S a écrit : > Hi, > > If one clicks on Postgres (non EDB) database and tries to expand the schema > tab, then the current git head spits out an error. The offending query > contains the following comparison > > protype = 1; > > protype is of type char, so it expects the RHS to be a char. However this > works ok against an EDB database. Anyways, the fix is to compare protype > with '1'. This sql works fine on both flavours of databases. Fixing this at > all relevant locations. > I"m not sure I understand. You first said that the bug is on regular PostgreSQL (and I can't reproduce it on 9.0 regular PostgreSQL). When you explain the bug and if I read correctly your patch, it fixes EDB database only. So is it a fix for EDB databases or PostgreSQL databases? -- Guillaume http://www.postgresql.fr http://dalibo.com
I"m not sure I understand. You first said that the bug is on regular
PostgreSQL (and I can't reproduce it on 9.0 regular PostgreSQL). When
you explain the bug and if I read correctly your patch, it fixes EDB
database only.
So is it a fix for EDB databases or PostgreSQL databases?
Well, the SQL does get fired against a PG database in the EDBAS mode for me. I too was puzzled about the minimum version check being EDBAS specific.
Anyways the fix to compare a char to a char should be there in any case..
Nikhils
Well, the SQL does get fired against a PG database in the EDBAS mode for me. I too was puzzled about the minimum version check being EDBAS specific.
Just checked. The version checker function checks for the version number and also for a bool which is set to true in EDBAS mode. So yeah, this will not be repro in pure Postgresql mode operations. Sorry for indicating so. But the issue defo comes if you try to browse a PG database in EDBAS mode.
Regards,
Nikhils
On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: > > >> >> Well, the SQL does get fired against a PG database in the EDBAS mode for >> me. I too was puzzled about the minimum version check being EDBAS specific. >> > > Just checked. The version checker function checks for the version number and > also for a bool which is set to true in EDBAS mode. So yeah, this will not > be repro in pure Postgresql mode operations. Sorry for indicating so. But > the issue defo comes if you try to browse a PG database in EDBAS mode. Why would you browse a PG database in EDBAS mode? Isn't there a whole lot of other things that would break in that case as well? Or maybe I'm misunderstanding what you mean with "EDBAS mode"? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: > On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >> >> >>> >>> Well, the SQL does get fired against a PG database in the EDBAS mode for >>> me. I too was puzzled about the minimum version check being EDBAS >>> specific. >>> >> >> Just checked. The version checker function checks for the version number >> and >> also for a bool which is set to true in EDBAS mode. So yeah, this will not >> be repro in pure Postgresql mode operations. Sorry for indicating so. But >> the issue defo comes if you try to browse a PG database in EDBAS mode. > > Why would you browse a PG database in EDBAS mode? Isn't there a whole > lot of other things that would break in that case as well? > > Or maybe I'm misunderstanding what you mean with "EDBAS mode"? > He means when edbas is running in PG mode instead of Oracle mode. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Tue, Feb 8, 2011 at 11:01, Dave Page <dpage@pgadmin.org> wrote: > On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >> On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >>> >>> >>>> >>>> Well, the SQL does get fired against a PG database in the EDBAS mode for >>>> me. I too was puzzled about the minimum version check being EDBAS >>>> specific. >>>> >>> >>> Just checked. The version checker function checks for the version number >>> and >>> also for a bool which is set to true in EDBAS mode. So yeah, this will not >>> be repro in pure Postgresql mode operations. Sorry for indicating so. But >>> the issue defo comes if you try to browse a PG database in EDBAS mode. >> >> Why would you browse a PG database in EDBAS mode? Isn't there a whole >> lot of other things that would break in that case as well? >> >> Or maybe I'm misunderstanding what you mean with "EDBAS mode"? >> > > He means when edbas is running in PG mode instead of Oracle mode. Ah, that makes more sense. And pgadmin incorrectly identifies that as an oracle-mode ebas server? In that case, isn't the actual problem that it's identified as edbas and not pg? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: > On Tue, Feb 8, 2011 at 11:01, Dave Page <dpage@pgadmin.org> wrote: >> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>> On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >>>> >>>> >>>>> >>>>> Well, the SQL does get fired against a PG database in the EDBAS mode >>>>> for >>>>> me. I too was puzzled about the minimum version check being EDBAS >>>>> specific. >>>>> >>>> >>>> Just checked. The version checker function checks for the version number >>>> and >>>> also for a bool which is set to true in EDBAS mode. So yeah, this will >>>> not >>>> be repro in pure Postgresql mode operations. Sorry for indicating so. >>>> But >>>> the issue defo comes if you try to browse a PG database in EDBAS mode. >>> >>> Why would you browse a PG database in EDBAS mode? Isn't there a whole >>> lot of other things that would break in that case as well? >>> >>> Or maybe I'm misunderstanding what you mean with "EDBAS mode"? >>> >> >> He means when edbas is running in PG mode instead of Oracle mode. > > Ah, that makes more sense. > > And pgadmin incorrectly identifies that as an oracle-mode ebas server? > In that case, isn't the actual problem that it's identified as edbas > and not pg? > It doesn't actually care. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Tue, Feb 8, 2011 at 11:10, Dave Page <dpage@pgadmin.org> wrote: > On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >> On Tue, Feb 8, 2011 at 11:01, Dave Page <dpage@pgadmin.org> wrote: >>> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>>> On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >>>>> >>>>> >>>>>> >>>>>> Well, the SQL does get fired against a PG database in the EDBAS mode >>>>>> for >>>>>> me. I too was puzzled about the minimum version check being EDBAS >>>>>> specific. >>>>>> >>>>> >>>>> Just checked. The version checker function checks for the version number >>>>> and >>>>> also for a bool which is set to true in EDBAS mode. So yeah, this will >>>>> not >>>>> be repro in pure Postgresql mode operations. Sorry for indicating so. >>>>> But >>>>> the issue defo comes if you try to browse a PG database in EDBAS mode. >>>> >>>> Why would you browse a PG database in EDBAS mode? Isn't there a whole >>>> lot of other things that would break in that case as well? >>>> >>>> Or maybe I'm misunderstanding what you mean with "EDBAS mode"? >>>> >>> >>> He means when edbas is running in PG mode instead of Oracle mode. >> >> Ah, that makes more sense. >> >> And pgadmin incorrectly identifies that as an oracle-mode ebas server? >> In that case, isn't the actual problem that it's identified as edbas >> and not pg? >> > > It doesn't actually care. Pre this report doesn't it sound like it should? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On Tue, Feb 8, 2011 at 7:14 PM, Magnus Hagander <magnus@hagander.net> wrote: > On Tue, Feb 8, 2011 at 11:10, Dave Page <dpage@pgadmin.org> wrote: >> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>> On Tue, Feb 8, 2011 at 11:01, Dave Page <dpage@pgadmin.org> wrote: >>>> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>>>> On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >>>>>> >>>>>> >>>>>>> >>>>>>> Well, the SQL does get fired against a PG database in the EDBAS mode >>>>>>> for >>>>>>> me. I too was puzzled about the minimum version check being EDBAS >>>>>>> specific. >>>>>>> >>>>>> >>>>>> Just checked. The version checker function checks for the version number >>>>>> and >>>>>> also for a bool which is set to true in EDBAS mode. So yeah, this will >>>>>> not >>>>>> be repro in pure Postgresql mode operations. Sorry for indicating so. >>>>>> But >>>>>> the issue defo comes if you try to browse a PG database in EDBAS mode. >>>>> >>>>> Why would you browse a PG database in EDBAS mode? Isn't there a whole >>>>> lot of other things that would break in that case as well? >>>>> >>>>> Or maybe I'm misunderstanding what you mean with "EDBAS mode"? >>>>> >>>> >>>> He means when edbas is running in PG mode instead of Oracle mode. >>> >>> Ah, that makes more sense. >>> >>> And pgadmin incorrectly identifies that as an oracle-mode ebas server? >>> In that case, isn't the actual problem that it's identified as edbas >>> and not pg? >>> >> >> It doesn't actually care. > > Pre this report doesn't it sound like it should? It *shouldn't*. PG/Oracle mode in PPAS is really just about whether certain oracle compatibility functions and packages are installed, and I think the date/time defaults. Oh, and possibly the default casts. But not the catalog schema. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Tue, Feb 8, 2011 at 22:09, Dave Page <dpage@pgadmin.org> wrote: > On Tue, Feb 8, 2011 at 7:14 PM, Magnus Hagander <magnus@hagander.net> wrote: >> On Tue, Feb 8, 2011 at 11:10, Dave Page <dpage@pgadmin.org> wrote: >>> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>>> On Tue, Feb 8, 2011 at 11:01, Dave Page <dpage@pgadmin.org> wrote: >>>>> On 2/8/11, Magnus Hagander <magnus@hagander.net> wrote: >>>>>> On Tue, Feb 8, 2011 at 08:22, Nikhil S <nixmisc@gmail.com> wrote: >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> Well, the SQL does get fired against a PG database in the EDBAS mode >>>>>>>> for >>>>>>>> me. I too was puzzled about the minimum version check being EDBAS >>>>>>>> specific. >>>>>>>> >>>>>>> >>>>>>> Just checked. The version checker function checks for the version number >>>>>>> and >>>>>>> also for a bool which is set to true in EDBAS mode. So yeah, this will >>>>>>> not >>>>>>> be repro in pure Postgresql mode operations. Sorry for indicating so. >>>>>>> But >>>>>>> the issue defo comes if you try to browse a PG database in EDBAS mode. >>>>>> >>>>>> Why would you browse a PG database in EDBAS mode? Isn't there a whole >>>>>> lot of other things that would break in that case as well? >>>>>> >>>>>> Or maybe I'm misunderstanding what you mean with "EDBAS mode"? >>>>>> >>>>> >>>>> He means when edbas is running in PG mode instead of Oracle mode. >>>> >>>> Ah, that makes more sense. >>>> >>>> And pgadmin incorrectly identifies that as an oracle-mode ebas server? >>>> In that case, isn't the actual problem that it's identified as edbas >>>> and not pg? >>>> >>> >>> It doesn't actually care. >> >> Pre this report doesn't it sound like it should? > > It *shouldn't*. PG/Oracle mode in PPAS is really just about whether > certain oracle compatibility functions and packages are installed, and > I think the date/time defaults. Oh, and possibly the default casts. > But not the catalog schema. Forgive me if I'm being dense... but doesn't this error indicate that it *isn't* just that? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On Tue, Feb 8, 2011 at 10:13 PM, Magnus Hagander <magnus@hagander.net> wrote: > Forgive me if I'm being dense... but doesn't this error indicate that > it *isn't* just that? No. Nikhil said (and the patch matches) that EDBAS, in PG mode or normal/Oracle mode, has the problem. On PostgreSQL, the problem doesn't exist (and isn't affected by these code paths anyway). -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Tue, Feb 8, 2011 at 22:19, Dave Page <dpage@pgadmin.org> wrote: > On Tue, Feb 8, 2011 at 10:13 PM, Magnus Hagander <magnus@hagander.net> wrote: >> Forgive me if I'm being dense... but doesn't this error indicate that >> it *isn't* just that? > > No. Nikhil said (and the patch matches) that EDBAS, in PG mode or > normal/Oracle mode, has the problem. On PostgreSQL, the problem > doesn't exist (and isn't affected by these code paths anyway). Hmm. I think I'm clearly not getting how this works, so I should probably just leave it to those who do :) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Thanks - applied. On Mon, Feb 7, 2011 at 1:01 PM, Nikhil S <nixmisc@gmail.com> wrote: > Hi, > > If one clicks on Postgres (non EDB) database and tries to expand the schema > tab, then the current git head spits out an error. The offending query > contains the following comparison > > protype = 1; > > protype is of type char, so it expects the RHS to be a char. However this > works ok against an EDB database. Anyways, the fix is to compare protype > with '1'. This sql works fine on both flavours of databases. Fixing this at > all relevant locations. > > Regards, > Nikhils > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Thanks - applied.
Thanks Dave.
Regards,
Nikhils
Regards,
Nikhils
> --On Mon, Feb 7, 2011 at 1:01 PM, Nikhil S <nixmisc@gmail.com> wrote:
> Hi,
>
> If one clicks on Postgres (non EDB) database and tries to expand the schema
> tab, then the current git head spits out an error. The offending query
> contains the following comparison
>
> protype = 1;
>
> protype is of type char, so it expects the RHS to be a char. However this
> works ok against an EDB database. Anyways, the fix is to compare protype
> with '1'. This sql works fine on both flavours of databases. Fixing this at
> all relevant locations.
>
> Regards,
> Nikhils
>
>
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company