| FAQ: Cannot import PostgreSQL Database into Clarion dictionary. What's wrong? |
|
|
|
| Written by Bernard Grosperrin | |
| Wednesday, 25 April 2007 | |
|
I have my database defined in PostgreSQL, but I can't find a way to import it into Clarion with the synchronizer. Still, others report success doing the same. What am I doing wrong?
Nothing, you are not doing anything wrong. It's just that Clarion is a little picky about the way it import labels ( Tables, Column, Keys, etc), from PostgreSQL. Here is the scoop:
By default, Postgresql is NOT case sensitive (coming from the UNIX world, historically it was). If you want it to be case sensitive, you have to put the label between quotes. Example:
If have a column named mycolumn. If I type: "Select MyColumn from mytable", it would work, as long as mycolumn is defined without quotes. If I define 'MYCOLUMN', then "Select MyColumn from mytable", would not work anymore, I would get an error saying that MyColumn does not exists. OK, that's for the Postgresql side.... Now, Clarion import ANY label with mixed cases or uppercases WITH QUOTES! Thus, making everything case sensitive...Problem is, somewhere in Clarion (don't remember where from the top of my head), Clarion generate UPPER CASE labels...So it does not work, as Postgresql expect whatever was the exact case of the label....( The generated upper case works if you imported all lower case (paradox!), as then, Postgresql is case insensitive..) So, to get everything imported in Clarion without quotes surrounding the labels (tables, columns, keys, etc), you need to have all of them lower case. Then, in your code, if you make a mistake and use MyColumn instead of mycolumn, it will still work. I even go to the extra step where I put a (lower case) NAME for each entity, so that everything will work even if the column order get mixed. |
|
| Last Updated ( Sunday, 29 April 2007 ) |
| < Prev | Next > |
|---|





