Re: Problems on "copy" statement
От | Michael Fuhr |
---|---|
Тема | Re: Problems on "copy" statement |
Дата | |
Msg-id | 20050413163937.GA91790@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: Problems on "copy" statement (Leung Wing Lap Ellery <lap01@netvigator.com>) |
Список | pgsql-novice |
On Thu, Apr 14, 2005 at 12:24:42AM +0800, Leung Wing Lap Ellery wrote: > > SELECT schemaname, tablename > FROM pg_tables > WHERE tablename ILIKE '%hsi%'; > > get: > > schemaname tablename > public HSI > > when run the sql: > > copy public.HSI from 'c:\java\hsi.txt' > > error: > > ERROR: relation "public.hsi" does not exist See the reference I posted about SQL identifiers, in particular where it talks about quoted identifiers: http://www.postgresql.org/docs/8.0/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS Since the table name has uppercase letters, you'll have to quote it. And now that I think about it, you might also have to escape the backslashes in the file name or use dollar quotes (available in 8.0 and later). Try one of these: COPY "HSI" FROM 'c:\\java\\hsi.txt'; COPY "HSI" FROM $$c:\java\hsi.txt$$; -- Michael Fuhr http://www.fuhr.org/~mfuhr/
В списке pgsql-novice по дате отправления: