Обсуждение: [GENERAL] Strange Errors...
Sorry I accidentally posted this to pgsql-general-owners earlier today… ******** How can this happen ( from the postgresql.log file) LOG: statement: select * from knives where manufacturer=‘Boker’ ERROR: column "‘boker’" does not exist at character 41 Some background: I am trying to move from 32 bit apps to 64 bit apps. I still have a couple of 32 bit apps that talk to postgresql. env: MacOS Sierra 10.12.3 postgresql 9.6.2 compiled as a 64 bit program. I also compiled it as a 32 bit program and glued the 64 bit and 32 bit libpq libraries together and replaced the installed 64 bit libpq library with the fat version. python 2.7.10 Apple’s version psycopg2 2.6.1 wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. My main interaction with my database is a wxpython app. I type sql into a text window and can send the contents of the window or the selection or the line containing the cursor to postgresql It appears that every single quote ( ‘ ) gets translated somehow to a double quote ( “ ). SQL statements that do not use quotes return properly and I can display the results in a grid. I have modified one of the test programs in the psycopg2 distribution that sends the selection shown in the log statement and it works properly. i.e. I can send the select statement and retrieve the results from a the psycopg2 python program. I can run basically the same wxpthon program on my fedora system without any problems (talking to the mac ). Any suggestions would be appreciated. Jerry
On 02/22/2017 07:09 AM, Jerry LeVan wrote: > Sorry I accidentally posted this to pgsql-general-owners earlier today… > ******** > How can this happen ( from the postgresql.log file) > > LOG: statement: select * from knives where manufacturer=‘Boker’ > ERROR: column "‘boker’" does not exist at character 41 > > Some background: > I am trying to move from 32 bit apps to 64 bit apps. I still > have a couple of 32 bit apps that talk to postgresql. > > env: > MacOS Sierra 10.12.3 > > postgresql 9.6.2 compiled as a 64 bit program. I also > compiled it as a 32 bit program and glued the 64 bit > and 32 bit libpq libraries together and replaced the > installed 64 bit libpq library with the fat version. > > python 2.7.10 Apple’s version > > psycopg2 2.6.1 > > wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. > > My main interaction with my database is a wxpython app. I type > sql into a text window and can send the contents of the window > or the selection or the line containing the cursor to postgresql > > It appears that every single quote ( ‘ ) gets translated somehow to No: test=# select ‘Boker’; ERROR: column "‘boker’" does not exist LINE 1: select ‘Boker’; test=# select 'Boker'; ?column? ---------- Boker (1 row) It is because they are ‘ ’ not ' '. So you need to find out what is causing your program to introduce ‘ ’. > a double quote ( “ ). SQL statements that do not use quotes return > properly and I can display the results in a grid. > > I have modified one of the test programs in the psycopg2 distribution > that sends the selection shown in the log statement and it works > properly. i.e. I can send the select statement and retrieve the results > from a the psycopg2 python program. > > I can run basically the same wxpthon program on my fedora system without > any problems (talking to the mac ). > > Any suggestions would be appreciated. > > Jerry > -- Adrian Klaver adrian.klaver@aklaver.com
> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: > > On 02/22/2017 07:09 AM, Jerry LeVan wrote: >> Sorry I accidentally posted this to pgsql-general-owners earlier today… >> ******** >> How can this happen ( from the postgresql.log file) >> >> LOG: statement: select * from knives where manufacturer=‘Boker’ >> ERROR: column "‘boker’" does not exist at character 41 >> >> Some background: >> I am trying to move from 32 bit apps to 64 bit apps. I still >> have a couple of 32 bit apps that talk to postgresql. >> >> env: >> MacOS Sierra 10.12.3 >> >> postgresql 9.6.2 compiled as a 64 bit program. I also >> compiled it as a 32 bit program and glued the 64 bit >> and 32 bit libpq libraries together and replaced the >> installed 64 bit libpq library with the fat version. >> >> python 2.7.10 Apple’s version >> >> psycopg2 2.6.1 >> >> wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. >> >> My main interaction with my database is a wxpython app. I type >> sql into a text window and can send the contents of the window >> or the selection or the line containing the cursor to postgresql >> >> It appears that every single quote ( ‘ ) gets translated somehow to > > No: > > test=# select ‘Boker’; > ERROR: column "‘boker’" does not exist > LINE 1: select ‘Boker’; > > test=# select 'Boker'; > ?column? > ---------- > Boker > (1 row) > > It is because they are ‘ ’ not ' '. > > So you need to find out what is causing your program to introduce ‘ ’. The mail program is displaying the straight quote as a curly quote… In the terminal program I see a straight quote. Perhaps wxpython is somehow confusing things… tain’t clear on how to test. > >> a double quote ( “ ). SQL statements that do not use quotes return >> properly and I can display the results in a grid. >> >> I have modified one of the test programs in the psycopg2 distribution >> that sends the selection shown in the log statement and it works >> properly. i.e. I can send the select statement and retrieve the results >> from a the psycopg2 python program. >> >> I can run basically the same wxpthon program on my fedora system without >> any problems (talking to the mac ). >> >> Any suggestions would be appreciated. >> >> Jerry >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com
On 02/22/2017 07:32 AM, Jerry LeVan wrote: > >> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >> >> On 02/22/2017 07:09 AM, Jerry LeVan wrote: >>> Sorry I accidentally posted this to pgsql-general-owners earlier today… >>> ******** >>> How can this happen ( from the postgresql.log file) >>> >>> LOG: statement: select * from knives where manufacturer=‘Boker’ >>> ERROR: column "‘boker’" does not exist at character 41 >>> >>> Some background: >>> I am trying to move from 32 bit apps to 64 bit apps. I still >>> have a couple of 32 bit apps that talk to postgresql. >>> >>> env: >>> MacOS Sierra 10.12.3 >>> >>> postgresql 9.6.2 compiled as a 64 bit program. I also >>> compiled it as a 32 bit program and glued the 64 bit >>> and 32 bit libpq libraries together and replaced the >>> installed 64 bit libpq library with the fat version. >>> >>> python 2.7.10 Apple’s version >>> >>> psycopg2 2.6.1 >>> >>> wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. >>> >>> My main interaction with my database is a wxpython app. I type >>> sql into a text window and can send the contents of the window >>> or the selection or the line containing the cursor to postgresql >>> >>> It appears that every single quote ( ‘ ) gets translated somehow to >> >> No: >> >> test=# select ‘Boker’; >> ERROR: column "‘boker’" does not exist >> LINE 1: select ‘Boker’; >> >> test=# select 'Boker'; >> ?column? >> ---------- >> Boker >> (1 row) >> >> It is because they are ‘ ’ not ' '. >> >> So you need to find out what is causing your program to introduce ‘ ’. > > The mail program is displaying the straight quote as a curly quote… > In the terminal program I see a straight quote. I thought the issue was with the wxPython program not the terminal, or are you saying they are the same thing? So you are see this(with straight quotes): test=# select "'Boker'"; ERROR: column "'Boker'" does not exist LINE 1: select "'Boker'"; So why is the mail program not converting the double quotes to typographical quotes also? : ERROR: column "‘boker’" does not exist at character 41 or converting the single quotes I sent? > > Perhaps wxpython is somehow confusing things… tain’t clear on > how to test. > >> >>> a double quote ( “ ). SQL statements that do not use quotes return >>> properly and I can display the results in a grid. >>> >>> I have modified one of the test programs in the psycopg2 distribution >>> that sends the selection shown in the log statement and it works >>> properly. i.e. I can send the select statement and retrieve the results >>> from a the psycopg2 python program. >>> >>> I can run basically the same wxpthon program on my fedora system without >>> any problems (talking to the mac ). >>> >>> Any suggestions would be appreciated. >>> >>> Jerry >>> >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com > > -- Adrian Klaver adrian.klaver@aklaver.com
On 02/22/2017 07:32 AM, Jerry LeVan wrote: > >> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >> >> On 02/22/2017 07:09 AM, Jerry LeVan wrote: >>> Sorry I accidentally posted this to pgsql-general-owners earlier today… >>> ******** >>> How can this happen ( from the postgresql.log file) >>> >>> LOG: statement: select * from knives where manufacturer=‘Boker’ >>> ERROR: column "‘boker’" does not exist at character 41 >>> >>> Some background: >>> I am trying to move from 32 bit apps to 64 bit apps. I still >>> have a couple of 32 bit apps that talk to postgresql. >>> >>> env: >>> MacOS Sierra 10.12.3 >>> >>> postgresql 9.6.2 compiled as a 64 bit program. I also >>> compiled it as a 32 bit program and glued the 64 bit >>> and 32 bit libpq libraries together and replaced the >>> installed 64 bit libpq library with the fat version. >>> >>> python 2.7.10 Apple’s version >>> >>> psycopg2 2.6.1 >>> >>> wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. >>> >>> My main interaction with my database is a wxpython app. I type >>> sql into a text window and can send the contents of the window >>> or the selection or the line containing the cursor to postgresql >>> >>> It appears that every single quote ( ‘ ) gets translated somehow to >> >> No: >> >> test=# select ‘Boker’; >> ERROR: column "‘boker’" does not exist >> LINE 1: select ‘Boker’; >> >> test=# select 'Boker'; >> ?column? >> ---------- >> Boker >> (1 row) >> >> It is because they are ‘ ’ not ' '. >> >> So you need to find out what is causing your program to introduce ‘ ’. > > The mail program is displaying the straight quote as a curly quote… > In the terminal program I see a straight quote. > > Perhaps wxpython is somehow confusing things… tain’t clear on > how to test. I have seen this issue when I cut and pasted data from word processing/spreadsheet programs and not paid attention to the fact they have settings that convert ' --> ’ and '' --> ‘‘ ’’. > >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com > > -- Adrian Klaver adrian.klaver@aklaver.com
> On Feb 22, 2017, at 9:49 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: > > On 02/22/2017 07:32 AM, Jerry LeVan wrote: >> >>> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >>> >>> On 02/22/2017 07:09 AM, Jerry LeVan wrote: >>>> Sorry I accidentally posted this to pgsql-general-owners earlier today… >>>> ******** >>>> How can this happen ( from the postgresql.log file) >>>> >>>> LOG: statement: select * from knives where manufacturer=‘Boker’ >>>> ERROR: column "‘boker’" does not exist at character 41 >>>> >>>> Some background: >>>> I am trying to move from 32 bit apps to 64 bit apps. I still >>>> have a couple of 32 bit apps that talk to postgresql. >>>> >>>> env: >>>> MacOS Sierra 10.12.3 >>>> >>>> postgresql 9.6.2 compiled as a 64 bit program. I also >>>> compiled it as a 32 bit program and glued the 64 bit >>>> and 32 bit libpq libraries together and replaced the >>>> installed 64 bit libpq library with the fat version. >>>> >>>> python 2.7.10 Apple’s version >>>> >>>> psycopg2 2.6.1 >>>> >>>> wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. >>>> >>>> My main interaction with my database is a wxpython app. I type >>>> sql into a text window and can send the contents of the window >>>> or the selection or the line containing the cursor to postgresql >>>> >>>> It appears that every single quote ( ‘ ) gets translated somehow to >>> >>> No: >>> >>> test=# select ‘Boker’; >>> ERROR: column "‘boker’" does not exist >>> LINE 1: select ‘Boker’; >>> >>> test=# select 'Boker'; >>> ?column? >>> ---------- >>> Boker >>> (1 row) >>> >>> It is because they are ‘ ’ not ' '. >>> >>> So you need to find out what is causing your program to introduce ‘ ’. >> >> The mail program is displaying the straight quote as a curly quote… >> In the terminal program I see a straight quote. >> >> Perhaps wxpython is somehow confusing things… tain’t clear on >> how to test. > > I have seen this issue when I cut and pasted data from word processing/spreadsheet programs and not paid attention to thefact they have settings that convert ' --> ’ and '' --> ‘‘ ’’. > >> >>> > I think you may be on to something….If I how down the straight quote in the text window for a few seconds I can see a ripple of changes to a different character when I release the key. If I zoom the terminal window displaying the log file the quote is clearly not the ‘straight’ quote. >>> >>> -- >>> Adrian Klaver >>> adrian.klaver@aklaver.com >> >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com
> On Feb 22, 2017, at 10:08 AM, Jerry LeVan <jerry.levan@gmail.com> wrote: > >> >> On Feb 22, 2017, at 9:49 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >> >> On 02/22/2017 07:32 AM, Jerry LeVan wrote: >>> >>>> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >>>> >>>> On 02/22/2017 07:09 AM, Jerry LeVan wrote: >>>>> Sorry I accidentally posted this to pgsql-general-owners earlier today… >>>>> ******** >>>>> How can this happen ( from the postgresql.log file) >>>>> >>>>> LOG: statement: select * from knives where manufacturer=‘Boker’ >>>>> ERROR: column "‘boker’" does not exist at character 41 >>>>> >>>>> Some background: >>>>> I am trying to move from 32 bit apps to 64 bit apps. I still >>>>> have a couple of 32 bit apps that talk to postgresql. >>>>> >>>>> env: >>>>> MacOS Sierra 10.12.3 >>>>> >>>>> postgresql 9.6.2 compiled as a 64 bit program. I also >>>>> compiled it as a 32 bit program and glued the 64 bit >>>>> and 32 bit libpq libraries together and replaced the >>>>> installed 64 bit libpq library with the fat version. >>>>> >>>>> python 2.7.10 Apple’s version >>>>> >>>>> psycopg2 2.6.1 >>>>> >>>>> wxpython '3.0.3.0.b20160914’ installed from the wxpython.org site. >>>>> >>>>> My main interaction with my database is a wxpython app. I type >>>>> sql into a text window and can send the contents of the window >>>>> or the selection or the line containing the cursor to postgresql >>>>> >>>>> It appears that every single quote ( ‘ ) gets translated somehow to >>>> >>>> No: >>>> >>>> test=# select ‘Boker’; >>>> ERROR: column "‘boker’" does not exist >>>> LINE 1: select ‘Boker’; >>>> >>>> test=# select 'Boker'; >>>> ?column? >>>> ---------- >>>> Boker >>>> (1 row) >>>> >>>> It is because they are ‘ ’ not ' '. >>>> >>>> So you need to find out what is causing your program to introduce ‘ ’. >>> >>> The mail program is displaying the straight quote as a curly quote… >>> In the terminal program I see a straight quote. >>> >>> Perhaps wxpython is somehow confusing things… tain’t clear on >>> how to test. >> >> I have seen this issue when I cut and pasted data from word processing/spreadsheet programs and not paid attention tothe fact they have settings that convert ' --> ’ and '' --> ‘‘ ’’. >> >>> >>>> >> > I think you may be on to something….If I how down the straight quote in the text window for a few seconds I can see a > ripple of changes to a different character when I release the key. If I zoom the terminal window displaying > the log file the quote is clearly not the ‘straight’ quote. >>>> >>>> -- >>>> Adrian Klaver >>>> adrian.klaver@aklaver.com >>> >>> >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com There is a setting in the Mac System Preferences that will allow you to turn off smart quotes. I did this and the program is acting properly once more :) Thanks for the tip. Jerry
On 02/22/2017 09:16 AM, Jerry LeVan wrote: > > > There is a setting in the Mac System Preferences that will allow you to turn > off smart quotes. Aah, Apple trying to be 'helpful'. Assumes everyone wants to output print copy everywhere. > > I did this and the program is acting properly once more :) > > Thanks for the tip. > > Jerry > > -- Adrian Klaver adrian.klaver@aklaver.com