Re: 1.8.4 bug DB Restriction field

From: "Michael Shapiro" <mshapiro51(at)gmail(dot)com>
To: "Zach Conrad" <zach(dot)conrad(at)digitecinc(dot)com>
Cc: "Guillaume Lelarge" <guillaume(at)lelarge(dot)info>, pgadmin-support(at)postgresql(dot)org
Subject: Re: 1.8.4 bug DB Restriction field
Date: 2008-06-05 21:46:42
Message-ID: ca3a8da20806051446l19208beaqbd429fd8513c8fcc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I think there is a problem with the syntax -- highlighted below

It seems that
datname NOT in (datname='blah')

should just be
datname NOT in ('blah')

SELECT db.oid, datname, db.dattablespace AS spcoid, spcname, datallowconn,
datconfig, datacl, pg_encoding_to_char(encoding) AS serverencoding,
pg_get_userbyid(datdba) AS datowner,has_database_privilege(db.oid, 'CREATE')
as cancreate, current_setting('default_tablespace') AS default_tablespace
FROM pg_database db LEFT OUTER JOIN pg_tablespace ta ON
db.dattablespace=ta.OID WHERE datname NOT IN (*datname='blah'*)

On Thu, Jun 5, 2008 at 3:43 PM, Zach Conrad <zach(dot)conrad(at)digitecinc(dot)com>
wrote:

> Thank you for your quick response.
>
> There are a few things this brings up:
>
> 1. The pgAdmin help file states the use of datname IN ('blah') in the DB
> Restriction field
> 2. Most people know which databases they want to connect to. Wouldn't it
> make
> more sense to use datename IN (...) rather than NOT IN?
>
> Thank you all for creating a great application!
>
> Sincerely,
>
> Zach Conrad
>
> ----- Original Message -----
> From: "Guillaume Lelarge" <guillaume(at)lelarge(dot)info>
> To: "Zach Conrad" <zach(dot)conrad(at)digitecinc(dot)com>
> Cc: pgadmin-support(at)postgresql(dot)org
> Sent: Thursday, June 5, 2008 3:31:55 PM GMT -06:00 US/Canada Central
> Subject: Re: [pgadmin-support] 1.8.4 bug DB Restriction field
>
> Zach Conrad a écrit :
> > DB Restriction field borks on datname IN ('blah') or datname='blah' with
> the error: "ERROR: operator does not exist: name <> boolean LINE 5: WHERE
> datname NOT IN (datname='blah')
> >
> > Here's the full query from the logs being sent from pgAdmin:
> > SELECT db.oid, datname, db.dattablespace AS spcoid, spcname,
> datallowconn, datconfig, datacl, pg_encoding_to_char(encoding) AS
> serverencoding, pg_get_userbyid(datdba) AS
> datowner,has_database_privilege(db.oid, 'CREATE') as cancreate,
> current_setting('default_tablespace') AS default_tablespace FROM pg_database
> db LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID WHERE datname
> NOT IN (datname='blah')
> >
>
> The DB Restriction field should not contain : datname IN ('blah')
>
> It should contain : 'blah'
> or : 'foo','bar'
>
> Regards.
>
>
> --
> Guillaume.
> http://www.postgresqlfr.org
> http://dalibo.com
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Anfinn Andreas Kolberg 2008-06-06 07:37:25 HELP
Previous Message Zach Conrad 2008-06-05 20:43:18 Re: 1.8.4 bug DB Restriction field