Previously I was getting a bad result when calling PQexecParams with
binary results because PostgreSQL stores its data big endian. So I
had to do ntohl on the result to get it to little endian.
My question is, do I also need to do htonl then, as in this scenario?
outStr[0]="blah";
outLengths[
I call PQexecParams with the last parameter as 1 to return binary
data. I then get this data with:
fileLengthPtr = PQgetvalue(result, rowIndex, fileLengthColumnIndex);
memcpy(&fileLength, fileLengthPtr, sizeof(fileLength));
The value being returned is of type integer.
It should have the value
Tom Lane wrote:
Kevin Jenkins <[EMAIL PROTECTED]> writes:
I get ERROR: there is no parameter $1.
INSERT INTO FileVersionHistory(applicationID, filename, createFile,
changeSetID, userName) VALUES (1,$1::text,FALSE,9,'postgres');
outTemp[0]=deletedFiles.fileList[fileLis
Hi,
I'm using PQexecParams so I can upload filenames including path that
have '\' characters. It works everywhere else I used it but not with
this query.
I get ERROR: there is no parameter $1.
INSERT INTO FileVersionHistory(applicationID, filename, createFile,
changeSetID, userName) VALUE
Is there a way to send and read binary data directly from memory,
without escaping characters, for SELECT and INSERT queries?
This is for a file repository, such as in source control.
I saw in the manual the section on bytea and binary data, but I don't
want to go through hundreds of megabytes
NULL DEFAULT 0,"
"changeSetID integer NOT NULL,"
"userName text NOT NULL,"
"CONSTRAINT file_has_data CHECK ( createFile=FALSE OR ((content IS NOT
NULL) AND (contentHash IS NOT NULL) AND (patch IS NOT NULL)) )"
");"
"COMMIT;";
Add an application