Home > Mobile >  How to deal with "." in Field Name Postgresql (periscope)
How to deal with "." in Field Name Postgresql (periscope)

Time:10-15

i am a newwbie to dbs sql postgres ^^ but i manage to do the basic queries

Now i struggle to query for a field that has this kind of name eg.: via.channel

i tried "", [] and any other way of escaping it but it doenst work.

Please Advice!

eg.

select via.channel
from my_database.channel
limit 10

CodePudding user response:

Try with this -

SELECT "via.channel"
FROM my_database.channel
LIMIT 10

It is recommended, using naming convention for columns in Postgres. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p1iw263fz6wvnbn1d6nyw71a9sf2.htm

It would be simple if there are not much dependencies on this column apart from select queries, use via_channel or something.

  • Related