how to access a table containing . in its name
I have created a database schema as "mytest.us" and inside this schema, I have created a table "a.b.c".
When I do
select * from select * from "mytest.us"."a.b.c";
year | mydata
------+--------
2011 | test1
2010 | test1(2 rows)
but when I do
\\! $TARGET/sql -p $PGPORT -d $PGDBNAME -c "select * from "mytest.us"."a.b.c"";
sh: -c: line 1: syntax error: unexpected end of file
0
Comments
Hi ,
Its shell related issue , try
Below work for me :
[dbadmin@mydphdb0184 ~]$ echo "select * from \"mytest.us\".\"a.b.c\";"|vsql dbadmin
Password:
a
---
(0 rows)
[dbadmin@mydphdb0184 ~]$
I hope you will find it useful.
Thanks