pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Malik Rumi <malik.a.rumi@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: FTS trigger works 1 at a time, but fails with bulk insert script
Date: Mon, 8 Oct 2018 12:56:58 -0700
Message-ID: <d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com> (raw)
In-Reply-To: <CAKd6oByX51Y4EzHKVdLESxViLssiqvK6HZvN8rK=31ksptTg6Q@mail.gmail.com>
References: <CAKd6oBwLXpBU4sJwAokp_1gkhO38gYW__HpRtGWfWLcEOpT1MQ@mail.gmail.com>
	<ff45112f-48a7-3384-7b5c-18f31ef5e5e0@aklaver.com>
	<CAKd6oByX51Y4EzHKVdLESxViLssiqvK6HZvN8rK=31ksptTg6Q@mail.gmail.com>

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 intersection table.
> 3. Uhh, I'm not sure. I assume this is it, that when a new entry is 
> posted, the function that parses the entry into searchable text and 
> indexes the words is called. But I can tell you I got this code from 
> this blog post: 
> blog.lotech.org/postgres-full-text-search-with-django.html 
> <http://blog.lotech.org/postgres-full-text-search-with-django.html;. I 
> asked the author about this issue. He said he wasn't sure wthout 
> debugging if it was something he left out or something I did wrong.
> 4. Postgresql 9.4. Yea, I know, I should upgrade...

Your function name does not match up with the code on the site, so we 
will need to see the actual trigger/function.

In psql do:

\d entry

to see the trigger definition and then post it here.

Also from that definition you can get the function name.

Again in psql do:

\ef fnc_name

to confirm the function is the one you think it is.

Would also be helpful to see the script you wrote to do the bulk insert.

> 
> */“None of you has faith until he loves for his brother or his neighbor 
> what he loves for himself.”/*
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (11+ messages)  latest in thread

Message-ID: <d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com>
Permalink:  ../d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com/
Also on:    postgresql.org/message-id/d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, malik.a.rumi@gmail.com
  Subject: Re: FTS trigger works 1 at a time, but fails with bulk insert script
  In-Reply-To: <d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com>
  References: <CAKd6oBwLXpBU4sJwAokp_1gkhO38gYW__HpRtGWfWLcEOpT1MQ@mail.gmail.com> <ff45112f-48a7-3384-7b5c-18f31ef5e5e0@aklaver.com> <CAKd6oByX51Y4EzHKVdLESxViLssiqvK6HZvN8rK=31ksptTg6Q@mail.gmail.com> <d5314372-76bc-6f7b-2be7-21d6cd09cf06@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox