Обсуждение: pgadmin3 -- adding CHECK constraint

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

pgadmin3 -- adding CHECK constraint

От
Bob Vandy
Дата:
I've googled and found no answer for the following:
 
(I'm using pgAdmin v 1.14.0)
 
I have a simple table with a column:
     Status       character varying(9) NOT NULL
 
I try to add a CHECK Constraint, whose definition is:
     Status in ('Assigned', 'Deleted', 'Available')
 
When I click OK, I get an error:
     ERROR:  column "status" does not exist
 
 
What am I doing wrong?
If nothing, and this is a bug, how can I work around it?
 
Many thanks in advance for any help.
 

Fwd: pgadmin3 -- adding CHECK constraint

От
Bob Vandy
Дата:
Sorry about this post;  I've figured out the problem.  It's because I use mixed-case in my table names and column names, so pgadmin3 quotes them.  And unless my other operations, (Constraints, queries, etc.), quote them as well this problem occurs.

---------- Forwarded message ----------
From: Bob Vandy <srehtvandy@gmail.com>
Date: Wed, Sep 28, 2011 at 7:04 PM
Subject: pgadmin3 -- adding CHECK constraint
To: pgadmin-support@postgresql.org


I've googled and found no answer for the following:
 
(I'm using pgAdmin v 1.14.0)
 
I have a simple table with a column:
     Status       character varying(9) NOT NULL
 
I try to add a CHECK Constraint, whose definition is:
     Status in ('Assigned', 'Deleted', 'Available')
 
When I click OK, I get an error:
     ERROR:  column "status" does not exist
 
 
What am I doing wrong?
If nothing, and this is a bug, how can I work around it?
 
Many thanks in advance for any help.
 

Re: pgadmin3 -- adding CHECK constraint

От
Ashesh Vashi
Дата:
On Thu, Sep 29, 2011 at 4:34 AM, Bob Vandy <srehtvandy@gmail.com> wrote:
> I've googled and found no answer for the following:
>
> (I'm using pgAdmin v 1.14.0)
>
> I have a simple table with a column:
>      Status       character varying(9) NOT NULL
>
> I try to add a CHECK Constraint, whose definition is:
>      Status in ('Assigned', 'Deleted', 'Available')
>
> When I click OK, I get an error:
>      ERROR:  column "status" does not exist
Hope - you're not missing the quotes around the column name.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company

http://www.linkedin.com/in/asheshvashi
>
>
> What am I doing wrong?
> If nothing, and this is a bug, how can I work around it?
>
> Many thanks in advance for any help.
>


Re: Fwd: pgadmin3 -- adding CHECK constraint

От
Dave Page
Дата:
On Thu, Sep 29, 2011 at 2:59 AM, Bob Vandy <srehtvandy@gmail.com> wrote:
> Sorry about this post;  I've figured out the problem.  It's because I use
> mixed-case in my table names and column names, so pgadmin3 quotes them.  And
> unless my other operations, (Constraints, queries, etc.), quote them as well
> this problem occurs.

Were your "other operations" manually written queries, or did pgAdmin
forget to quote something?



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgadmin3 -- adding CHECK constraint

От
Francisco Leovey
Дата:
If your column name is Status you have to write 'Status'

From: Bob Vandy <srehtvandy@gmail.com>
To: pgadmin-support@postgresql.org
Sent: Wednesday, September 28, 2011 8:04 PM
Subject: [pgadmin-support] pgadmin3 -- adding CHECK constraint

I've googled and found no answer for the following:
 
(I'm using pgAdmin v 1.14.0)
 
I have a simple table with a column:
     Status       character varying(9) NOT NULL
 
I try to add a CHECK Constraint, whose definition is:
     Status in ('Assigned', 'Deleted', 'Available')
 
When I click OK, I get an error:
     ERROR:  column "status" does not exist
 
 
What am I doing wrong?
If nothing, and this is a bug, how can I work around it?
 
Many thanks in advance for any help.