Andrea Santos escreveu:
> A minha tabela se chama USUARIO.
> 
> O caminho do path está configurado corretamento, tanto que ele consegue 
> fazer o select, porém só faz se eu coloco o nome da tabela entre ""
> 
> String sqk = "SELECT * FROM /"USUARIO/" "
> 
> 
> O que então poderia estar errado ? Existe alguma restrição com o nome da 
> tabela estar em maiusculo?
> 


Do manual do PostgreSQL em:
http://www.postgresql.org/docs/8.3/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
veja particularmente o parágrafo final:

"Identifier and key word names are case insensitive. Therefore:

UPDATE MY_TABLE SET A = 5;

can equivalently be written as:

uPDaTE my_TabLE SeT a = 5;

A convention often used is to write key words in upper case and 
names in lower case, e.g.:

UPDATE my_table SET a = 5;

There is a second kind of identifier: the delimited identifier or 
quoted identifier. It is formed by enclosing an arbitrary 
sequence of characters in double-quotes ("). A delimited 
identifier is always an identifier, never a key word. So "select" 
could be used to refer to a column or table named "select", 
whereas an unquoted select would be taken as a key word and would 
therefore provoke a parse error when used where a table or column 
name is expected. The example can be written with quoted 
identifiers like this:

UPDATE "my_table" SET "a" = 5;

Quoted identifiers can contain any character, except the 
character with code zero. (To include a double quote, write two 
double quotes.) This allows constructing table or column names 
that would otherwise not be possible, such as ones containing 
spaces or ampersands. The length limitation still applies.

Quoting an identifier also makes it case-sensitive, whereas 
unquoted names are always folded to lower case. For example, the 
identifiers FOO, foo, and "foo" are considered the same by 
PostgreSQL, but "Foo" and "FOO" are different from these three 
and each other. (The folding of unquoted names to lower case in 
PostgreSQL is incompatible with the SQL standard, which says that 
unquoted names should be folded to upper case. Thus, foo should 
be equivalent to "FOO" not "foo" according to the standard. If 
you want to write portable applications you are advised to always 
quote a particular name or never quote it.)"

Osvaldo
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a