MaxLongVarChar and new lines in text
am 23.03.2006 17:03:06 von aklThis is a multi-part message in MIME format.
--------------060001090209070307080601
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Hi,
I'm having a problem with line breaks and the MaxLongVarChar setting.=20
I'm using Postgrsql 8.1.3 and ODBC version 08.01.0200(ansi). When I set
MaxLongVarChar <=3D 16383 it gives different results than using
MaxLongVarChar > 16383 or MaxLongVarChar =3D -4 (which is no limit). I
insert a newline in the db like this: INSERT INTO test VALUES ('\n');=20
and then retrieve it from my odbc app and write the result to a file.=20
CommLogs and result files are attached.
When using a small MaxLongVarChar value the result is (in hex) 0a0d (new=20
line, carriage teturn). For large MaxLongVarChar its 000a (new line=20
only). Any Windows app requires both new line and carriage return to=20
display new line correct. Any reason why this should differ when using=20
bigger values in MaxLongVarChar? We use the LF<->CR/LF conversion on.
I'm using 16383 in my app to day and it would be nice to increase this
without breaking my app.
Regards,
=C5smund Kveim Lie
--------------060001090209070307080601
Content-Type: application/octet-stream;
name="psqlodbc_5840.log"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="psqlodbc_5840.log"
Y29ubiA9IDcwOTkxMzA0LCBQR0FQSV9Db25uZWN0KERTTj0ncm9mdXMnLCBV
SUQ9J2hha29uaGMnLCBQV0Q9J3h4eHh4JykKR2xvYmFsIE9wdGlvbnM6IFZl
cnNpb249JzA4LjAxLjAyMDAnLCBmZXRjaD0xMDAsIHNvY2tldD0wLCB1bmtu
b3duX3NpemVzPTI1NCwgbWF4X3ZhcmNoYXJfc2l6ZT0tNCwgbWF4X2xvbmd2
YXJjaGFyX3NpemU9NzA5OTI3MTIKICAgICAgICAgICAgICAgIGRpc2FibGVf
b3B0aW1pemVyPTEsIGtzcW89MSwgdW5pcXVlX2luZGV4PTEsIHVzZV9kZWNs
YXJlZmV0Y2g9MAogICAgICAgICAgICAgICAgdGV4dF9hc19sb25ndmFyY2hh
cj0xLCB1bmtub3duc19hc19sb25ndmFyY2hh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VjdCBvcHRpb24gKFNldCknCiAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LQogICAgICAgICAgICBoZW52PTcwOTkxMjMyLCBjb25uPTcwOTkxMzA0LCBz
dGF0dXM9MSwgbnVtX3N0bXRzPTE2CkNPTk4gRVJST1I6IGZ1bmM9UEdBUElf
U2V0Q29ubmVjdE9wdGlvbiwgZGVzYz0nZk9wdGlvbj0xMDQyLCB2UGFyYW09
MTY2MzI0NzYnLCBlcnJudW09MjA1LCBzcWxzdGF0ZT0sIGVycm1zZz0nVW5r
bm93biBjb25uZWN0IG9wdGlvbiAoU2V0KScKICAgICAgICAgICAgLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tCiAgICAgICAgICAgIGhlbnY9NzA5OTEyMzIsIGNvbm49NzA5
OTEzMDQsIHN0YXR1cz0xLCBudW1fc3RtdHM9MTYKY29ubj03MDk5MTMwNCwg
cXVlcnk9J1NFTEVDVCB2ZXJzaW9uKCknCmNvbm49NzA5OTEzMDQsIHF1ZXJ5
PSdTRUxFQ1QgKiBGUk9NIHRlc3QnCmNvbm49NzA5OTEzMDQsIFBHQVBJX0Rp
c2Nvbm5lY3QK
--------------060001090209070307080601
Content-Type: application/octet-stream;
name="psqlodbc_5600.log"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="psqlodbc_5600.log"
Y29ubiA9IDcwOTkxMzA0LCBQR0FQSV9Db25uZWN0KERTTj0ncm9mdXMnLCBV
SUQ9J2hha29uaGMnLCBQV0Q9J3h4eHh4JykKR2xvYmFsIE9wdGlvbnM6IFZl
cnNpb249JzA4LjAxLjAyMDAnLCBmZXRjaD0xMDAsIHNvY2tldD0wLCB1bmtu
b3duX3NpemVzPTI1NCwgbWF4X3ZhcmNoYXJfc2l6ZT0xNj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EzMDQsIHF1ZXJ5PSdzZXQgY2xpZW50X2VuY29k
aW5nIHRvICdsYXRpbjknJwpDT05OIEVSUk9SOiBmdW5jPVBHQVBJX1NldENv
bm5lY3RPcHRpb24sIGRlc2M9J2ZPcHRpb249MTA0MSwgdlBhcmFtPTE2NjMy
NDc2JywgZXJybnVtPTIwNSwgc3Fsc3RhdGU9LCBlcnJtc2c9J1Vua25vd24g
Y29ubmVjdCBvcHRpb24gKFNldCknCiAgICAgICAgICAgIC0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLQogICAgICAgICAgICBoZW52PTcwOTkxMjMyLCBjb25uPTcwOTkxMzA0
LCBzdGF0dXM9MSwgbnVtX3N0bXRzPTE2CkNPTk4gRVJST1I6IGZ1bmM9UEdB
UElfU2V0Q29ubmVjdE9wdGlvbiwgZGVzYz0nZk9wdGlvbj0xMDQyLCB2UGFy
YW09MTY2MzI0NzYnLCBlcnJudW09MjA1LCBzcWxzdGF0ZT0sIGVycm1zZz0n
VW5rbm93biBjb25uZWN0IG9wdGlvbiAoU2V0KScKICAgICAgICAgICAgLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tCiAgICAgICAgICAgIGhlbnY9NzA5OTEyMzIsIGNvbm49
NzA5OTEzMDQsIHN0YXR1cz0xLCBudW1fc3RtdHM9MTYKY29ubj03MDk5MTMw
NCwgcXVlcnk9J1NFTEVDVCB2ZXJzaW9uKCknCmNvbm49NzA5OTEzMDQsIHF1
ZXJ5PSdTRUxFQ1QgKiBGUk9NIHRlc3QnCmNvbm49NzA5OTEzMDQsIFBHQVBJ
X0Rpc2Nvbm5lY3QK
--------------060001090209070307080601
Content-Type: application/octet-stream;
name="8.1-16383"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="8.1-16383"
DQo=
--------------060001090209070307080601
Content-Type: application/octet-stream;
name="8.1-4"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="8.1-4"
Cg==
--------------060001090209070307080601
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
--------------060001090209070307080601--