BUG #2758: missing quotes in SQL sentence

Поиск
Список
Период
Сортировка
Искать

BUG #2758: missing quotes in SQL sentence

От:
"scoanda" <sabin.coanda@deuromedia.ro>
Дата:
The following bug has been logged online:

Bug reference:      2758
Logged by:          scoanda
Email address:      sabin.coanda@deuromedia.ro
PostgreSQL version: 8.1.4
Operating system:   Windows XP sp2
Description:        missing quotes in SQL sentence
Details: 

I set the transaction isolation level for an user with 
ALTER ROLE  SET default_transaction_isolation='read committed';

In pgAdmin I get the sentence without quotes:
ALTER ROLE  SET default_transaction_isolation=read committed;

This doesn't work if I copy/paste to SQL Query window.

Re: BUG #2758: missing quotes in SQL sentence

От:
"Jim C. Nasby" <jim@nasby.net>
Дата:
That's a pgadmin bug; please report it to them.

On Tue, Nov 14, 2006 at 03:42:53PM +0000, scoanda wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      2758
> Logged by:          scoanda
> Email address:      sabin.coanda@deuromedia.ro
> PostgreSQL version: 8.1.4
> Operating system:   Windows XP sp2
> Description:        missing quotes in SQL sentence
> Details: 
> 
> I set the transaction isolation level for an user with 
> ALTER ROLE  SET default_transaction_isolation='read committed';
> 
> In pgAdmin I get the sentence without quotes:
> ALTER ROLE  SET default_transaction_isolation=read committed;
> 
> This doesn't work if I copy/paste to SQL Query window.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
> 

-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

Re: BUG #2758: missing quotes in SQL sentence

От:
"Dave Page" <dpage@postgresql.org>
Дата:
No, it's the intended behaviour. pgAdmin doesn't have any idea how you want to quote SET values, so it leaves it to you to add them.

Regards, Dave

> ------- Original Message -------
> From: "Jim C. Nasby" 
> To: scoanda 
> Sent: 14/11/06, 19:15:59
> Subject: Re: [BUGS] BUG #2758: missing quotes in SQL sentence
> 
> That's a pgadmin bug; please report it to them.
> 
> On Tue, Nov 14, 2006 at 03:42:53PM +0000, scoanda wrote:
> > 
> > The following bug has been logged online:
> > 
> > Bug reference:      2758
> > Logged by:          scoanda
> > Email address:      sabin.coanda@deuromedia.ro
> > PostgreSQL version: 8.1.4
> > Operating system:   Windows XP sp2
> > Description:        missing quotes in SQL sentence
> > Details: 
> > 
> > I set the transaction isolation level for an user with 
> > ALTER ROLE  SET default_transaction_isolation='read committed';
> > 
> > In pgAdmin I get the sentence without quotes:
> > ALTER ROLE  SET default_transaction_isolation=read committed;
> > 
> > This doesn't work if I copy/paste to SQL Query window.
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> >        subscribe-nomail command to majordomo@postgresql.org so that your
> >        message can get through to the mailing list cleanly
> > 
> 
> -- 
> Jim Nasby                                            jim@nasby.net
> EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

Re: BUG #2758: missing quotes in SQL sentence

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Dave Page wrote:
> No, it's the intended behaviour. pgAdmin doesn't have any idea how
> you want to quote SET values, so it leaves it to you to add them.

Just quote them all.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: BUG #2758: missing quotes in SQL sentence

От:
Dave Page <dpage@postgresql.org>
Дата:
Peter Eisentraut wrote:
> Dave Page wrote:
>> No, it's the intended behaviour. pgAdmin doesn't have any idea how
>> you want to quote SET values, so it leaves it to you to add them.
> 
> Just quote them all.

Doesn't work:

scratch=# set search_path = '"MyNameSpace1", "MyNameSpace2"';
ERROR:  schema ""MyNameSpace1", "MyNameSpace2"" does not exist

That one must be unquoted:

scratch=# set search_path = "MyNameSpace1", "MyNameSpace2";
SET

Regards, Dave.
FAQ