...
For example on Centos/RHEL you will find the database cluster in
Code Block |
---|
/var/lib/pgsql/12/data/ |
and the binary in
Code Block |
---|
/usr/pgsql-12/bin/ |
Starting PostgreSQL
Using the bundled PostgreSQL (assuming you run this from within the application_server directory):
...
After you installed Servoy and PostgreSQL you might find that PostgreSQL is not running.
This usually could be mean 2 things:
...
PostgreSQL doesn't do automatic casting of types. This means that when sending in parameters into a prepared statement, it is up to the developer to make sure to send in the right type.
For example:
Code Block | ||
---|---|---|
| ||
var value = 1; var query = "SELECT * FROM table WHERE textcolumn = ?" var args = new Array(); args[0] = value; var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, args, maxReturnedRows); |
Has to become:
Code Block | ||
---|---|---|
| ||
var value = 1; var query = "SELECT * FROM table WHERE textcolumn = ?" var args = new Array(); args[0] = value + ""; //forcing the integer value to become a string var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, args, maxReturnedRows); |
...
Quoting for column Aliasses:
Code Block | ||
---|---|---|
| ||
SELECT some_column as "A nice name" FROM table |
Quoting literal strings:
Code Block | ||
---|---|---|
| ||
SELECT * FROM table where text_column = 'someValue' |
...