Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-14 Thread Ian Lawrence Barwick
2013/3/13 Alexander Farber alexander.far...@gmail.com: Thank you, this was indeed the (uneeded) semicolon at end of the COPY line. May I ask another question - (...) When I add few more words to my text file and then try to load it into my table again, then the COPY command will fail,

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-14 Thread Alexander Farber
Thank you - On Thu, Mar 14, 2013 at 10:40 AM, Ian Lawrence Barwick barw...@gmail.com wrote: I also have an INSERT trigger on my table, can I return a NULL from it or something similar? Yes, if you test for the presence of the word you can return NULL and the row will be discarded. See

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-14 Thread Ian Lawrence Barwick
2013/3/14 Alexander Farber alexander.far...@gmail.com: Thank you - On Thu, Mar 14, 2013 at 10:40 AM, Ian Lawrence Barwick barw...@gmail.com wrote: I also have an INSERT trigger on my table, can I return a NULL from it or something similar? Yes, if you test for the presence of the word you

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-13 Thread Alexander Farber
Thank you, this was indeed the (uneeded) semicolon at end of the COPY line. May I ask another question - On Tue, Mar 12, 2013 at 6:24 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/3/13 Alexander Farber alexander.far...@gmail.com: I have a list of 40 non-english words, each on a

[GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Alexander Farber
Hello, I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column of the following table (also in UTF8 and 8.4.13): create table good_words ( word varchar(64) primary key, verified boolean not null default

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Ian Lawrence Barwick
2013/3/13 Alexander Farber alexander.far...@gmail.com: Hello, I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column of the following table (also in UTF8 and 8.4.13): create table good_words ( word

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Alexander Farber
Unfortunately doesn't work - On Tue, Mar 12, 2013 at 5:53 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/3/13 Alexander Farber alexander.far...@gmail.com: I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Ian Lawrence Barwick
2013/3/13 Alexander Farber alexander.far...@gmail.com: Unfortunately doesn't work - On Tue, Mar 12, 2013 at 5:53 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/3/13 Alexander Farber alexander.far...@gmail.com: I have a list of 40 non-english words, each on a separate line and