Problem Note 67190: "ERROR: 42809: cannot copy from view 'view-name'" occurs when you use the BULKUNLOAD= data set option to access data from a PostgreSQL view
SAS/ACCESS® Interface to PostgreSQL retrieves an error message when you use the BULKUNLOAD= data set option to retrieve data from a PostgreSQL view.
The error is similar to the following message:
************** Begin: PSQL Log File **************
psql:temporary-path/BL_view-name_0.ctl:2: ERROR: 42809: cannot copy from view "view-name"
HINT: Try the COPY (SELECT ...) TO variant.
LOCATION: BeginCopyTo, copy.c:1703
************** End: PSQL Log File **************
ERROR:
**********************************************************************
Please look in the PSQL log file for the load results.
PSQL Log File location(available only if BL_DELETE_DATAFILE=NO was set) : -- log-path/bulkload.log --
Note: In a Client/Server environment, the Log File is located on the Server. The log file is also
echoed in the Server SAS log file.
Workarounds for this issue include the following:
- Create a PostgreSQL table from the PostgreSQL view, and then use the BULKUNLOAD= option to access the table.
- Do not use the BULKUNLOAD= option.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
z/OS 64-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft® Windows® for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 10 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2008 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2008 R2 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2008 for x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2012 Datacenter | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Std | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Std | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2016 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2019 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled AIX | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled Solaris | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
HP-UX IPF | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Linux for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Solaris for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
*
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.
While the BULKUNLOAD= data set option works well with PostgreSQL tables, it can fail when used with PostgreSQL views.
Type: | Problem Note |
Priority: | high |
Topic: | Data Management ==> Data Sources ==> External Databases ==> PostgreSQL
|
Date Modified: | 2021-03-03 10:00:44 |
Date Created: | 2021-01-07 02:59:06 |