SQL is not case sensitive as long as you omit the quotes. The following names are all identical:
EMPLOYEE, EmPLoyee, emploYEE
The following tables are different:
"EMPLOYEE", "EmPLoyee", "emploYEE"
while using this
\d EMPLOYEE (or) \d employee
it throw error : relation EMPLOYEE does not exist.
\d "EMPLOYEE"
it display the EMPLOYEE relation description
if you get struck some where in PostgreSQL like this, do rename the table to either all upper/lower case.
1) \o /tmp/rename_tbl_lower
2) select 'ALTER TABLE '||'"'||tablename||'"'||' RENAME TO ' ||
lower(tablename)||';' from pg_tables where schemaname = 'public';
come out of psql then run
3) psql -U username database < /tmp/rename_tbl_lower
enter into psql
\d employee
it display the EMPLOYEE relation description
I've faced this issue while migrating data from Oracle to PostgreSQL using Navigator tool. normally navigator tool ignore the constraint. it focus only the data migration part. for this reason i just used ispirer-sqlways for convertion of schema.
relation name created by navigator and ispirer-sqlways are totally Ir-relevant, so I renamed all relation by upper/lower as said above.
All about data processing & analytics. Open source database,No-SQL and Hadoop. Discussed issues/solution which I've got during my experience..
Wednesday, June 5, 2013
Subscribe to:
Post Comments (Atom)
Labels
- #agriculture (1)
- #ai (5)
- #pdf (1)
- Big Data (30)
- blogging (3)
- data analytics (5)
- data science (7)
- Deep Learning (4)
- Hadoop (28)
- Hadoop Eco System (27)
- hdfsCommands (4)
- Hive (5)
- IssueSolution (4)
- jobs (3)
- links (1)
- Machine Learning (4)
- mahout (2)
- MapReduce (1)
- MongoDB (6)
- MySQL (4)
- PlpgSQL (8)
- postgres (6)
- PostgreSQL (53)
- R (20)
- RHadoop (2)
- search keywords (1)
- social (2)
- spark (3)
- twitter (6)
- usecase (2)
- visualization (7)
- weka (1)
No comments:
Post a Comment