SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 52685: SAS/ACCESS® Interface to PostgreSQL might generate a "CLI execute" error when it is used against a Unicode Server

DetailsHotfixAboutRate It

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

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to PostgreSQL64-bit Enabled AIX9.49.49.4 TS1M19.4 TS1M2
64-bit Enabled Solaris9.49.49.4 TS1M19.4 TS1M2
HP-UX IPF9.49.49.4 TS1M19.4 TS1M2
Linux for x649.49.49.4 TS1M19.4 TS1M2
Solaris for x649.49.49.4 TS1M19.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.