Re: Error: "Out of memory while reading tuples." in pushing table from SAS to PostgreSQL on Mac

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: wetter wetterana <wetterana(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Error: "Out of memory while reading tuples." in pushing table from SAS to PostgreSQL on Mac
Date: 2014-12-14 16:25:28
Message-ID: 548DB9F8.6020901@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-12-14 16:32:51 Re: Error: "Out of memory while reading tuples." in pushing table from SAS to PostgreSQL on Mac
Previous Message Vick Khera 2014-12-14 16:23:36 Re: Blocking access by remote users for a specific time period