Problem Note 52685: SAS/ACCESS® Interface to PostgreSQL might generate a "CLI execute" error when it is used against a Unicode Server
Using SAS/ACCESS Interface to PostgreSQL in conjunction with a Unicode Server might result in the following (or similar) error being generated:
ERROR: CLI execute error: ERROR: syntax error at or near
"?\214\200?\210\200?\224\200?\204\200?\220\200?\224\200?\200\200?\214\200?\214\
200??\200?\224\200??\200?\204\200?\200\200?\210\200?\204\200?\200\200?\
220\200??\200?1/4\200?\220\200?\210\200?\210\200?\200\200?\204\200?\224\200?\
220\200??\200?1/4\200?\210\200??\200??\200?\204\200?\220\200??\200?1/4\200??\200?\2
00\200?\210\200?\204\200?\200\200?\220\200??\200?1/4\200?\224\200?\214\200?\224\
200?\210\200?\210\200";
This error can be caused by transcoding that is not done correctly. The SAS® client and server, PostgreSQL driver, and PostgreSQL server should all be in sync with the same encoding settings.
To help the driver do the correct transcoding, you should set the environment variable PGCLIENTENCODING to the appropriate client encoding on all Linux or other UNIX platforms in the !SASROOT/bin/sasenv_local file.
The PGCLIENTENCODING variable can be set to different values depending on what the client machine is running. For example, if you are running a Unicode SAS server, you might need to set the value to UTF8 in the !SASROOT/bin/sasenv_local file like this:
PGCLIENTENCODING=UTF8
export PGCLIENTENCODING
For SAS sessions using English. you might want to set this value to LATIN1.
Other values can be found in the PostgreSQL online documentation under Automatic Character Set Conversion Between Server and Client
Click the Hot Fix tab in this note to access the hot fix for this issue.
The hot fix enables the driver to take full advantage of the PGCLIENTENCODING setting.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PostgreSQL | 64-bit Enabled AIX | 9.4 | 9.4 | 9.4 TS1M1 | 9.4 TS1M2 |
64-bit Enabled Solaris | 9.4 | 9.4 | 9.4 TS1M1 | 9.4 TS1M2 |
HP-UX IPF | 9.4 | 9.4 | 9.4 TS1M1 | 9.4 TS1M2 |
Linux for x64 | 9.4 | 9.4 | 9.4 TS1M1 | 9.4 TS1M2 |
Solaris for x64 | 9.4 | 9.4 | 9.4 TS1M1 | 9.4 TS1M2 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Topic: | Data Management ==> Data Sources ==> External Databases ==> PostgreSQL
|
Date Modified: | 2014-05-02 14:54:26 |
Date Created: | 2014-04-03 14:57:07 |