First time here? Check out the FAQ!
1

Need to be DB superuser to migrate askbot?
 

I get the following error when doing manag.py migrate askbot

File "/home/graeme/iqapy/lib/python2.5/site-packages/askbot/management/commands/init_postgresql_full_text_search.py", line 19, in handle_noargs
cursor.execute("CREATE LANGUAGE plpgsql")
psycopg2.ProgrammingError: must be superuser to create procedural language

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago
graeme's avatar
319
graeme
asked 14 years ago

Comments

What is the version of your postgres?
Evgeny's avatar Evgeny (14 years ago)
see more comments

1 Answer

1

It depends on the version of postrges and how the admins had configured it.

In postgres <= 8.2 you do need to be a superuser to run that command and you may have additional problems running the trigger setup that is applied later in the same migration. I've written the full text trigger code using version 8.3 manual.

On versions >= 8.3 database can be configured so that database owner can run it, the default setting allows it.

If do not have access to postgres 8.3 and higher, then it might be easier for you to use MySQL.

I'll make the migration fail on this condition more softly, by disabling the full text search in such cases. The problem is that triggers for the full text indexing are written in plpgsql procedural language that needs to be created in your database.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago, answered 14 years ago
link

Comments

Thanks, it is the postgres version. I will try with MySQL.
graeme's avatar graeme (14 years ago)
Will it be possible to enable the full text search if I move to a newer version of postgres later on?
graeme's avatar graeme (14 years ago)
Yes, you will be able to migrate to Postgres, I'll try to migrate this site by Monday. MySQL deployment actually has full text search, but it cannot do relevance ranking.
Evgeny's avatar Evgeny (14 years ago)
see more comments