Use of INNER JOIN and others ??!?
Use of INNER JOIN and others ??!?
От:
Luis Sousa <llsousa@ualg.pt>
Дата:
Is it possible to use the statements INNER JOIN, OUTER JOIN, LEFT JOIN and RIGHT JOIN in the new version of PostgreSQL 7.1 ? Luis Sousa
i have a big trouble
Hello list,
i expirienced that postgres seems doesn't want to eat it's own
dump... why? even freshly created!
whats wrong with me?
www_mod_lv=> \copy news from '/home/sites/www.mod.lv/web/news.sql'
\.
ERROR: copy: line 2, pg_atoi: error in "
At the international humanitarian mission of KFOR the Latvian unit participates with 10 soldiers from the National Armed Forces. The KFOR Latvian contingent - Military Police and medical units - will operate within the contingent of UK. "
: can't parse "
At the international humanitarian mission of KFOR the Latvian unit participates with 10 soldiers from the National Armed Forces. The KFOR Latvian contingent - Military Police and medical units - will operate within the contingent of UK. "
PQendcopy: resetting connection
i tried to do \copy from stdin, than throw in a one row of data, ended
with \., it doesnt work also.
This is my table:
CREATE TABLE news(
id SERIAL PRIMARY KEY,
flag CHAR(1) NOT NULL,
rubrika CHAR(1) NOT NULL,
datums_ TIMESTAMP NOT NULL,
datums VARCHAR(30) NOT NULL,
virsraksts VARCHAR(200) NOT NULL,
teksts TEXT,
url VARCHAR(30),
url_txt VARCHAR(50)
);
an example row of data (tab separated) attached.
anyone may have an idea?
--
Sandis
7777609
9237502Re: Use of INNER JOIN and others ??!?
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> Is it possible to use the statements INNER JOIN, OUTER JOIN, LEFT JOIN > and RIGHT JOIN in the new version of PostgreSQL 7.1 ? Yes in 7.1beta. See FAQ 'outer' entry for a short description. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Re: i have a big trouble
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Sandis Jerics writes: > www_mod_lv=> \copy news from '/home/sites/www.mod.lv/web/news.sql' > \. > ERROR: copy: line 2, pg_atoi: error in " > At the international humanitarian mission of KFOR the Latvian unit participates with 10 soldiers from the National Armed Forces. The KFOR Latvian contingent - Military Police and medical units - will operate within the contingent of UK. " Notice that the complaint is from pg_atoi, so the problem is that the given text is being taken as an integer field --- that is, as the start of a new row of data. I suspect what is happening is that the embedded newlines in your text column are getting munged up so that they look like ordinary newlines (end of a data row) to COPY. A newline that is part of the data, and not a row separator, has to be represented as a backslash followed by a newline (\n) character. Anything that messes this up will confuse COPY. One theory that comes to mind is that you edited the dump file with an editor that converts Unix-style newlines (\n) to DOS-style (\r\n). Then your embedded newlines would become backslash \r \n ... in other words, a quoted \r followed by a regular end-of-row marker. regards, tom lane