Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to insert large file to Postgres server
Message
De
21/02/2006 12:30:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How to insert large file to Postgres server
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Divers
Thread ID:
01097795
Message ID:
01097795
Vues:
91
I need to insert a 6 MB BYTEA field to Postgres 8.1 table.
Computer has 128 MB RAM

Using SQLEXEC to insert data to causes error Could not send query to backend
In ODBC driver log I found a line

[208]QResult: free memory out

I need to insert 6 MB binary files to Postgres database from VFP.
I think 6 MB is not so much compared to avalibale RAM (128 MB)


part of mylog file:

[208]globals.extra_systable_prefixes = 'dd_;'
[208][[SQLAllocHandle]][208]**** in PGAPI_AllocEnv **
[208]** exit PGAPI_AllocEnv: phenv = 18685840 **
[208][[SQLSetEnvAttr]] att=200,2
[208][[SQLAllocHandle]][208]PGAPI_AllocConnect: entering...
[208]**** PGAPI_AllocConnect: henv = 18685840, conn = 18691680
[208]EN_add_connection: self = 18685840, conn = 18691680
[208] added at i =0, conn->henv = 18685840, conns[i]->henv
= 18685840
[208][SQLGetInfoW(30)][208]PGAPI_GetInfo: entering...fInfoType=7
7
[208]PGAPI_GetInfo: p='03.00', len=10, value=0, cbMax=12
[208][SQLSetConnectAttrW][208]PGAPI_SetConnectAttr 102
[208]PGAPI_SetConnectOption: entering fOption = 102 vParam = 1
[208][SQLSetConnectAttrW][208]PGAPI_SetConnectAttr 103
[208]PGAPI_SetConnectOption: entering fOption = 103 vParam = 15
[208][SQLSetConnectAttrW][208]PGAPI_SetConnectAttr 112
[208]PGAPI_SetConnectOption: entering fOption = 112 vParam = 409
6
[208][SQLDriverConnectW][208]PGAPI_DriverConnect: entering...
[208]**** PGAPI_DriverConnect: fDriverCompletion=1, connStrIn='D
RIVER={PostgreSQL Unicode};UID=eeta;PWD=xxxxxxxxxx;DATABASE=test

.........

[208] stmt_with_params = ' INSERT INTO localfil (filename,las
tchange,contents)
values( 'myfile.exe' , CURRENT_TIMESTAMP, '
MZ\\\\220\\\\000\\\\003\\\\000\\\\000\\\\000\\\\004\\\\000\\\\00
0\\\\000\\\\377\\\\377\\\\000\\\\000\\\\270\\\\000\\\\000\\\\000
\\\\000\\\\000\\\\000\\\\000@\\\\000\\\\000\\\\000\\\\000\\\\000
\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\
......... 6 MB of data
\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\203A\\\\000
\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\337^Y\\\\000' )'
[208]LIBPQ_execute_query: entering ...
[208]in QR_Constructor
[208]exit QR_Constructor
[208]entering PGCONN_Destructor
[208]exiting PGCONN_Destructor
[208]QResult: in DESTRUCTOR
[208]QResult: free memory in, fcount=0
[208]QResult: free memory out
[208]QResult: exit DESTRUCTOR
[208]STATEMENT ERROR: func=SC_execute, desc='', errnum=27, sqlst
ate=, errmsg='Could not send query to backend'
[208]CONN ERROR: func=SC_execute, desc='', errnum=109, sqlstate=
......
Andrus
Répondre
Fil
Voir

Click here to load this message in the networking platform