On 12/14/2014 08:14 AM, wetter wetterana wrote:
Apologies, I am using SAS, a statistical package/database management system. SAS has the feature of connecting to a PostgreSQL server. It does so by assigning what is called a libname (a 'library' connection telling SAS that a particular folder is a data storage). In this assignment, you specify the server address, databasename, password. I.e. SAS connects to the server and allows you to push data to/read data/manipulate data in the PSQL database.
So are you using the SAS Postgres interface or are you going through ODBC? The fact that you say you cannot use bulkload would seem to indicate ODBC.
If via ODBC, see Andys comments.
Here is the code in SAS: # connect to the server and assign it the name 'psqlibrary' libname psqlibrary postgres server='xxx.xx.xxx.x' port=5432 user=username password='xxxxxxx' database=dbname; # then append data to the table 'table' in the psql database proc append base = psqlibrary.table data = datatoappend; run; SAS reports back error messages from the server if it receives such errors. In my case, I repeatedly get the error described above. This error is also reported in my terminal app if I log into the database at the same time to monitor things there. I.e. as far as I can tell, the error "Out of memory while reading tuples.; No query has been executed with that handle" stems from PSQL itself. SAS prefixes the error with some specific indicators such as "GLOBAL SYSDBMSG POSTGRES" or "ERROR: CLI describe error". Adrian, you are right, PSQL does receive the data. Also not sure what you mean by cursor,
Actually that was Andy. For information on cursors see here: http://www.postgresql.org/docs/9.3/interactive/sql-declare.html I really new to PSQL... sorry!
Help much appreciated!
-- Adrian Klaver adrian.klaver@xxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general