1

When I try to run the following code I get an error that disappear when I call the tables using quotation marks. I remember having run tables before without it.

select cine as INE from "Nucleos_capital"

3
  • 2
    This could be the answer : prisma.io/dataguide/postgresql/short-guides/…
    – J.R
    Commented Feb 14 at 16:22
  • You have faced a case that requires to use "SQL delimited identifiers". Basic SQL thing with no connection to GIS.
    – user30184
    Commented Feb 14 at 16:26
  • @J.R Thanks you for your reply that works
    – user
    Commented Feb 19 at 0:38

1 Answer 1

4

In PostgreSQL DB table names should be (are by default) all-lower-case. You can, however, create a table braking this rule, but then the only way you can refer to it is by enclosing the table name in double quotes.
In other words,if your table was named nucleos_capital you could select * from nucleos_capital. Now it is Nucleos_capital, hence the need to use quotes.
You can rename it: alter table "Nucleos_capital" rename to nucleos_capital (mind the use of quotes!)

Not the answer you're looking for? Browse other questions tagged or ask your own question.