Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-09 Thread Adrian Klaver
On 10/9/18 3:25 PM, Malik Rumi wrote: I have several different logs. I'm not sure which is the 'right' one. None of them show anything other than routine start and stop activity, even after I added a single Entry document. However, I did notice despite the 'incomplete startup', the last one is

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-09 Thread Malik Rumi
I have several different logs. I'm not sure which is the 'right' one. None of them show anything other than routine start and stop activity, even after I added a single Entry document. However, I did notice despite the 'incomplete startup', the last one is the only one that mentions listening on an

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Adrian Klaver
On 10/8/18 3:54 PM, Adrian Klaver wrote: On 10/8/18 1:58 PM, Malik Rumi wrote: So what is the script you used to do the bulk INSERT? There's actually three, but they are all basically the same. The differences have to do with the source material being inserted: # usr/local/bin/python3.6 # co

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Adrian Klaver
On 10/8/18 1:58 PM, Malik Rumi wrote: So what is the script you used to do the bulk INSERT? There's actually three, but they are all basically the same. The differences have to do with the source material being inserted: # usr/local/bin/python3.6 # coding: utf-8 from os import environ enviro

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Malik Rumi
So what is the script you used to do the bulk INSERT? There's actually three, but they are all basically the same. The differences have to do with the source material being inserted: # usr/local/bin/python3.6 # coding: utf-8 from os import environ environ['DJANGO_SETTINGS_MODULE'] = 'chronicle.s

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Adrian Klaver
On 10/8/18 1:25 PM, Malik Rumi wrote: I hope this comes out readable. If not I can do a separate attachment. I notice it says 'BEFORE INSERT'. Maybe that should be after? No as the return value would be ignored: https://www.postgresql.org/docs/10/static/plpgsql-trigger.html "The return value

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Malik Rumi
I hope this comes out readable. If not I can do a separate attachment. I notice it says 'BEFORE INSERT'. Maybe that should be after? Table "public.ktab_entry" Column | Type | Collation | Nullable | Default ---+--

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Adrian Klaver
On 10/8/18 12:29 PM, Malik Rumi wrote: 1. This code is entry_search_vector_trigger(), one of 3 trigger functions based on the Django model that created the site. 2. So this is the trigger definition (as far as I know) and it is on the Entry table. There is also a Tag table and the Tags intersect

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-08 Thread Malik Rumi
1. This code is entry_search_vector_trigger(), one of 3 trigger functions based on the Django model that created the site. 2. So this is the trigger definition (as far as I know) and it is on the Entry table. There is also a Tag table and the Tags intersection table. 3. Uhh, I'm not sure. I assume

Re: FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-02 Thread Adrian Klaver
On 10/2/18 10:34 AM, Malik Rumi wrote: I have set up Postgres FTS on a Django/Python web site, and it works as expected except for this one thing. When I wrote a script to bulk insert legacy docs, the script works fine but the FTS trigger does not fire. I have to go back and open each document

FTS trigger works 1 at a time, but fails with bulk insert script

2018-10-02 Thread Malik Rumi
I have set up Postgres FTS on a Django/Python web site, and it works as expected except for this one thing. When I wrote a script to bulk insert legacy docs, the script works fine but the FTS trigger does not fire. I have to go back and open each document one at a time to get them indexed. What am