Re: Strange Errors...

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Jerry LeVan <jerry(dot)levan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Strange Errors...
Date: 2017-02-22 15:49:17
Message-ID: 8a4303e0-dd63-a6c9-5b1b-54b8035ae7e6@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/22/2017 07:32 AM, Jerry LeVan wrote:
>
>> On Feb 22, 2017, at 9:20 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2017-02-22 15:59:53 Re: Indexes and MVCC
Previous Message Adrian Klaver 2017-02-22 15:41:20 Re: Strange Errors...