Skip site navigation (1) Skip section navigation (2)

Unknown character on copy

To: <pgsql-novice(at)postgresql(dot)org>
Subject: Unknown character on copy
Date: 2011-07-22 14:08:14
Message-ID: 377C0288D30BE04BA7B5FD60BDFC0C911A6F7001@crexc52p (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have noticed on some of my imports with copy I will get a funny character now and then in some of the data.  When it shows up it will always be the first character in the string.  I did a simple test to try to find it.
Here is my setup:
Table – 
-- Table: pigdig
-- DROP TABLE pigdig;
  "name" character varying
ALTER TABLE pigdig OWNER TO postgres;
Data in forimport.txt :
copy command being used:
COPY pigdig (name)
FROM E'\\Documents and Settings\\username\\My Documents\\postgres\\Pg Daily Inventory\\forimport.txt'
Now, when looking at the data in the table I get:
"mary"  but marry has a box in front of “mary”, the box has a solid border with a clear center.
Problem – why did this come into the table, what is the character?  
I pasted the data into excel and isolated the character, in excel it shows up as a box with a question mark.  In excel , I did =CHAR(ROW()) in rows 1 to 255 with the offending character in E1, then tried to equate it to all of the characters in rows 1 through 255 – it was not equivalent to any.
So I do not know what the character is and how it made its way into the import process.
That in and of itself is an issue, plus since it is now in postgres when I query I cannot query on ‘mary’ 
Further, when I am in pgadmin III and view table data then past that mary into a query window, the character in question is no longer a box but is a light bullet point looking character.
Any ideas on:
How and why this came into the import process and got into my data?
What the character is?


pgsql-novice by date

Next:From: Tom LaneDate: 2011-07-22 14:25:29
Subject: Re: Unknown character on copy
Previous:From: Vic RossDate: 2011-07-22 11:01:25
Subject: org.postgresql.util.PSQLException: The user property is missing. It is mandatory.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group