advanced option set NG when create a PostgreSQL ODBC with windows powershell

"Zeng, Lei" <[email protected]> Tue, 10 Sep 2019 05:07:51 +0000
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <BYAPR12MB29670411604C44D7127E2F5D93B60@BYAPR12MB2967.namprd12.prod.outlook.com>
--_000_BYAPR12MB29670411604C44D7127E2F5D93B60BYAPR12MB2967namp_
Content-Type: text/plain; charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

Hi

My OS is windows10 64bit
When I try to create a PostgreSQL ODBC with powershell

Actions :
1. install PostgreSQL ODBC
2. Run powershell  with admin role
3. Run
Add-OdbcDsn PostgreSQLWithPowerShell -DriverName "PostgreSQL Unicode(x64)" =
-DsnType System -SetPropertyValue @("Server=3Dlocalhost", "Trusted_Connecti=
on=3DYes", "Database=3Dappdb", "Port=3D5432", "UserName=3Dtest", "Password=
=3Dtest", "MaxVarcharSize=3D200")

Result:
1.PostgreSQLWithPowerShell  was created successfully.
2.The config "Server=3Dlocalhost", "Trusted_Connection=3DYes", "Database=3D=
appdb", "Port=3D5432", "UserName=3Dtest", "Password=3Dtest" was setted succ=
essfully.
3.But the advanced option config "MaxVarcharSize=3D200" was not work.
=1B$B"(=1B(Bsee https://odbc.postgresql.org/docs/config-opt.html

Question:
how can the config [MaxVarcharSize=3D200] work with powershell ? thanks
Disclaimer: This email and any attachments are sent in strictest confidence=
 for the sole use of the addressee and may contain legally privileged, conf=
idential, and proprietary data. If you are not the intended recipient, plea=
se advise the sender by replying promptly to this email and then delete and=
 destroy this email and any attachments without any further use, copying or=
 forwarding.

--_000_BYAPR12MB29670411604C44D7127E2F5D93B60BYAPR12MB2967namp_
Content-Type: text/html; charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:m=3D"http://schema=
s.microsoft.com/office/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html=
40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-2022-=
jp">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"=1B$B#M#S=1B(B =1B$B%4%7%C%/=1B(B";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
	{font-family:"=1B$B#M#S=1B(B =1B$B%4%7%C%/=1B(B";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
	{font-family:"\@=1B$B#M#S=1B(B =1B$B%4%7%C%/=1B(B";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0mm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.17
	{mso-style-type:personal-compose;
	font-family:"Arial","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Arial","sans-serif";}
/* Page Definitions */
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026">
<v:textbox inset=3D"5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"JA" link=3D"blue" vlink=3D"purple" style=3D"text-justify-trim=
:punctuation">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">Hi<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt"><o:p=
>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">My O=
S is windows10 64bit<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">When=
 I try to create a PostgreSQL ODBC with powershell<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt"><o:p=
>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">Acti=
ons :<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">1. i=
nstall PostgreSQL ODBC<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">2. R=
un powershell &nbsp;with admin role<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">3. R=
un <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">Add-=
OdbcDsn PostgreSQLWithPowerShell -DriverName &quot;PostgreSQL Unicode(x64)&=
quot; -DsnType System -SetPropertyValue @(&quot;Server=3Dlocalhost&quot;, &=
quot;Trusted_Connection=3DYes&quot;, &quot;Database=3Dappdb&quot;, &quot;Po=
rt=3D5432&quot;, &quot;UserName=3Dtest&quot;,
 &quot;Password=3Dtest&quot;, &quot;MaxVarcharSize=3D200&quot;)<o:p></o:p><=
/span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt"><o:p=
>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">Resu=
lt:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">1.Po=
stgreSQLWithPowerShell &nbsp;was created successfully.<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">2.Th=
e config &quot;Server=3Dlocalhost&quot;, &quot;Trusted_Connection=3DYes&quo=
t;, &quot;Database=3Dappdb&quot;, &quot;Port=3D5432&quot;, &quot;UserName=
=3Dtest&quot;, &quot;Password=3Dtest&quot; was setted successfully.<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">3.Bu=
t the advanced option config &quot;MaxVarcharSize=3D200&quot; was not work.=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;=
=1B$B#M#S=1B(B =1B$B%4%7%C%/=1B(B&quot;">=1B$B"(=1B(B</span><span lang=3D"E=
N-US" style=3D"font-size:10.0pt">see https://odbc.postgresql.org/docs/confi=
g-opt.html<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt"><o:p=
>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">Ques=
tion:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:10.0pt">how =
can the config [MaxVarcharSize=3D200] work with powershell ? thanks<o:p></o=
:p></span></p>
</div>
Disclaimer: This email and any attachments are sent in strictest confidence=
 for the sole use of the addressee and may contain legally privileged, conf=
idential, and proprietary data. If you are not the intended recipient, plea=
se advise the sender by replying
 promptly to this email and then delete and destroy this email and any atta=
chments without any further use, copying or forwarding.
</body>
</html>

--_000_BYAPR12MB29670411604C44D7127E2F5D93B60BYAPR12MB2967namp_--