Dear.
I'm using Ubuntu 22.04 and decided to test Postgres, I found an example here on the list. I installed Postgres on linux without errors and then completed the database example, also without errors:
#!/bin/bash# log file# export OCDB_LOGFILE=/tmp/ocesql.log# If OCDB_LOGLEVEL is set, then the ocesql.log file is created under /tmp# Possible values:# - nothing to set -> same as NOLOG# - NOLOG or nolog# - ERR or err# - DEBUG or debugexportOCDB_LOGLEVEL=DEBUG
# If you do not set the OCDB_DB_CHAR environment variable, then "SJIS" will be# used as default. See ocesql.c in _ocesqlConnectMain() function.# If it is not set, then there are errors for example at duplicate key.exportOCDB_DB_CHAR=UTF8
# start program
./PGTEST7
So the first question is: does it work using a psql command?
Note: you currently use ocesql, so you possibly want to check out the "more modern" GixSQL (which also supports ocesql's syntax in all places I've tested).
Additional note: Please always prefer text output over image output, the later won't be seen when searching. Also consider to register/login before posting, removing the moderation need (and if you don't then please post only once, then waiting at least 48 hours before posting the same).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2023-02-28
Dear, I tried to use gixSQL, both in linux and in windows, but without success. Even the examples didn't work.
What is the correct way to use psql?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear, I tried to use gixSQL, both in linux and in windows, but without success. Even the examples didn't work.
I can't reproduce this, worked fine (of course you need a DB server running and setup accordingly).
If you experience any issues with GixSQL I'd suggest to check their docs and open an issue there: https://github.com/mridoni/gixsql
What is the correct way to use psql?
psql is a command line utility, so psql --help may be useful. Then try to connect to the DB using the same information as you do in COBOL to validate that this works in general.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear.
I'm using Ubuntu 22.04 and decided to test Postgres, I found an example here on the list. I installed Postgres on linux without errors and then completed the database example, also without errors:
And then:
Mod-Edit: formatting
Last edit: Simon Sobisch 2023-02-07
So the first question is: does it work using a
psqlcommand?Note: you currently use ocesql, so you possibly want to check out the "more modern" GixSQL (which also supports ocesql's syntax in all places I've tested).
Additional note: Please always prefer text output over image output, the later won't be seen when searching. Also consider to register/login before posting, removing the moderation need (and if you don't then please post only once, then waiting at least 48 hours before posting the same).
Dear, I tried to use gixSQL, both in linux and in windows, but without success. Even the examples didn't work.
What is the correct way to use psql?
I can't reproduce this, worked fine (of course you need a DB server running and setup accordingly).
If you experience any issues with GixSQL I'd suggest to check their docs and open an issue there: https://github.com/mridoni/gixsql
psql is a command line utility, so
psql --helpmay be useful. Then try to connect to the DB using the same information as you do in COBOL to validate that this works in general.