vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, This is my first message, and I need some help. I have just installed Postgresql 8.2. (Windows). At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all columns correctly. But when I try to get only one column, SELECT senha FROM USUARIOS, I get the error message: ERROR: column "senha" does not exist SQL state: 42703 Character: 8 What is the problem ? -- -- Aílsom F. Heringer Rio de Janeiro, Brasil ailsom@gmail.com ailsom@uol.com.br ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| "=?ISO-8859-1?Q?A=EDlsom_F._Heringer?=" <ailsom@gmail.com> writes: > At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all > columns correctly. But when I try to get only one column, SELECT senha > FROM USUARIOS, I get the error message: > ERROR: column "senha" does not exist Sounds like a case-sensitivity/quoting issue. I suggest carefully reading the rules for quoted and unquoted identifiers explained here: http://www.postgresql.org/docs/8.2/s...AX-IDENTIFIERS The executive summary is in the last line: "you are advised to always quote a particular name or never quote it". I think you probably created the table using a quoted identifier for "senha", except with some other capitalization than that. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| The column is defined as "Senha", but even when use "SELECT Senha FROM Usuarios" i get the same error. Aílsom 2008/2/2, Tom Lane <tgl@sss.pgh.pa.us>: > "=?ISO-8859-1?Q?A=EDlsom_F._Heringer?=" <ailsom@gmail.com> writes: > > At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all > > columns correctly. But when I try to get only one column, SELECT senha > > FROM USUARIOS, I get the error message: > > > ERROR: column "senha" does not exist > > Sounds like a case-sensitivity/quoting issue. I suggest carefully > reading the rules for quoted and unquoted identifiers explained here: > > http://www.postgresql.org/docs/8.2/s...AX-IDENTIFIERS > > The executive summary is in the last line: "you are advised to always > quote a particular name or never quote it". I think you probably > created the table using a quoted identifier for "senha", except with > some other capitalization than that. > > regards, tom lane > -- -- Aílsom F. Heringer Rio de Janeiro, Brasil ailsom@gmail.com ailsom@uol.com.br ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| On Feb 2, 2008 12:36 PM, Aílsom F. Heringer <ailsom@gmail.com> wrote: > Hi, > This is my first message, and I need some help. I have just installed > Postgresql 8.2. (Windows). > > At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all > columns correctly. But when I try to get only one column, SELECT senha > FROM USUARIOS, I get the error message: > > ERROR: column "senha" does not exist > SQL state: 42703 > Character: 8 > > What is the problem ? > ERROR: column "senha" does not exist I think is pretty obvious... maybe the name has upercase letters? if that is the case you must use the name in double-quotes (") maybe you can show us the table definition as shown by pgAdmin 3 for more opinions... -- regards, Jaime Casanova "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| am Sat, dem 02.02.2008, um 15:54:59 -0200 mailte Aílsom F. Heringer folgendes: > The column is defined as "Senha", but even when use "SELECT Senha FROM > Usuarios" i get the same error. select "Senha" from "Usuarios"; And, finally, please no top-posting. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |