pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL update function faililed in Webmin Interface
3+ messages / 3 participants
[nested] [flat]

* SQL update function faililed in Webmin Interface
@ 2004-10-20 07:03  Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Kathiravan Velusamy @ 2004-10-20 07:03 UTC (permalink / raw)
  To: pgsql-sql; pgsql-general@postgresql.org

Hello All,

           I am a newbie to PostgreSQL. I am using postgreSQL 7.4.5 in HP-Unix 11.11 PA , and 11.23 PA.

          I have a problem with postgreSQL Webmin (Webmin Version 1.070) testing in update function.

          This problem exists only when i create a new data base through webmin interface, 
          and insert some values,and modify those values afterwards. 
 
For E.g :

    I created database called "test" and created table name called "one" for that DB,
 which contains filed name "Name" with varchar(10) as a type and allows Null values.

   I inserted values for two rows as first and second, it can be viewed perfectly. 
But when i select second row (Which contains string "second" as value) to edit, 
and change it value as "second1" instead of "second", it throws me following error when i saved it : 
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
"SQL update "one" set Name = 'Second1' where oid = 25349 failed : column "name" of relation "one" does not exist".

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
But when i created the database without using this Webmin interface
 ($ echo "create table one(Name varchar(10))"|psql test ), 
and then edit with webmin interface means it works well and get updated.

Is there any problem with postgreSQL or with Webmin interface ?
Any idea to solve this issue ?
 
Thanks in Advance,
Kathir

 
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004


		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] SQL update function faililed in Webmin Interface
@ 2004-10-20 07:37  Richard Huxton <dev@archonet.com>
  parent: Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Richard Huxton @ 2004-10-20 07:37 UTC (permalink / raw)
  To: Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org

Kathiravan Velusamy wrote:
> I created database called "test" and created table name called "one"
> for that DB, which contains filed name "Name" with varchar(10) as a
> type and allows Null values.

The issue here is that you have created a column "Name" with quotes,
which means it is case-sensitive.

> "SQL update "one" set Name = 'Second1' where oid = 25349 failed :
> column "name" of relation "one" does not exist".

You are then trying to access it without quotes which means it gets
folded to lower-case "name" (look carefully at the error message).

If you quote the name when you create it, ALWAYS quote it. If you never 
quote names then you won't have any problems.

It might be that the webmin module quoted the column-name for you 
without your knowledge. You'll need to consult your webmin documentation 
for details.

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SQL update function faililed in Webmin Interface
@ 2004-10-20 07:49  Scott Marlowe <smarlowe@qwest.net>
  parent: Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2004-10-20 07:49 UTC (permalink / raw)
  To: Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org

On Wed, 2004-10-20 at 01:03, Kathiravan Velusamy wrote:
> Hello All,
>            I am a newbie to PostgreSQL. I am using postgreSQL 7.4.5 in
> HP-Unix 11.11 PA , and 11.23 PA.
>           I have a problem with postgreSQL Webmin (Webmin Version
> 1.070) testing in update function.
>           This problem exists only when i create a new data base
> through webmin interface, 
>           and insert some values,and modify those values afterwards. 
>  
> For E.g :
>     I created database called "test" and created table name called
> "one" for that DB,
>  which contains filed name "Name" with varchar(10) as a type and
> allows Null values.
>    I inserted values for two rows as first and second, it can be
> viewed perfectly. 
> But when i select second row (Which contains string "second" as value)
> to edit, 
> and change it value as "second1" instead of "second", it throws me
> following error when i saved it : 
>  
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
> "SQL update "one" set Name = 'Second1' where oid = 25349 failed :
> column "name" of relation "one" does not exist".
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
> But when i created the database without using this Webmin interface
>  ($ echo "create table one(Name varchar(10))"|psql test ), 
> and then edit with webmin interface means it works well and get
> updated.
> Is there any problem with postgreSQL or with Webmin interface ?
> Any idea to solve this issue ?
>  

It looks like the table is being defined with the column quoted, like
this:

create table one ("Name" text, moredefshere...)

but accessed without quotes, like above.  Whether a database folds to
upper or lower case, the columns need to be accessed consistenly, either
all quoted or never quoted.  An application that mixes quoting and not
quoting identifiers is going to have problems.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-10-20 07:49 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 07:03 SQL update function faililed in Webmin Interface Kathiravan Velusamy <kathiravan_velusamy@yahoo.com>
2004-10-20 07:37 ` Richard Huxton <dev@archonet.com>
2004-10-20 07:49 ` Scott Marlowe <smarlowe@qwest.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox