Re: syntax error but command executes anyway?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: syntax error but command executes anyway?
Дата
Msg-id 1087667732.28062.49.camel@localhost.localdomain
обсуждение исходный текст
Ответ на syntax error but command executes anyway?  (Kevin Murphy <murphy@genome.chop.edu>)
Ответы Re: syntax error but command executes anyway?  (Kevin Murphy <murphy@genome.chop.edu>)
Список pgsql-general
On Sat, 2004-06-19 at 07:14, Kevin Murphy wrote:
> Using PG 7.4.3 on Mac OS X 10.2.8, the following "insert into ... select ..."
> statement completed and then announced a syntax error, which seems bizarre.

It's not actually inserting anything...

> (Don't be confused by the fact that the two tables referred to
> (public.identifiers and original.identifiers) have slightly different column
> names.)
>
> egenome_dev=# \!cat /Users/murphy/cvs/egora/sql/data_port/port_identifiers.sql
> INSERT INTO public.identifiers (element_id, name, source, source_code, title)
>         SELECT DISTINCT
>                 elementid,
>                 name,
>                 source,
>                 sourcecode,
>                 title
>         FROM original.identifiers;
> egenome_dev=# \i /Users/murphy/cvs/egora/sql/data_port/port_identifiers.sql
> INSERT 0 1672036

This INSERT 0 part tells you it didn't actually insert anything.
Since I don't see any obvious error, I'm wondering if maybe there are
characters in the sql file that don't print that are causing this
problem.  Try recreating the SQL by hand and see if you get the same
problem.  Use the simplest editor on your system, like vi or notepad or
whatever.



В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: INSERT BEFORE Trigger
Следующее
От: Tom Lane
Дата:
Сообщение: Re: syntax error but command executes anyway?