Solving 'function "lexize" already exists with same argument types' in PostgreSQL

Posted by Bill McGonigle Thu, 19 Jun 2008 20:22:00 GMT

If you run across:

function "lexize" already exists with same argument types
          

in PostgreSQL, when adding tsearch2 to a database, even when you’ve created a fresh new database, you probably have a corrupt copy of tsearch2 in your template1 database, which is used to create your ‘fresh’ database.

To fix this, copy the uninstalltsearch2.sql somewhere temporarily (on a Fedora-derived OS it’s at: /usr/share/pgsql/contrib/uninstalltsearch2.sql) and remove the BEGIN; and END; transaction statements from the file, then run it against your template1, ala:

psql template1 < /tmp/uninstalltsearch2notransaction.sql

and it will go through and delete all of tsearch2. Expect some failure messages if it’s partially deleted already, this is normal.

Now you can load tsearch2 into your new database without complaints.

del.icio.us:Solving 'function "lexize" already exists with same argument types' in PostgreSQL digg:Solving 'function "lexize" already exists with same argument types' in PostgreSQL reddit:Solving 'function "lexize" already exists with same argument types' in PostgreSQL spurl:Solving 'function "lexize" already exists with same argument types' in PostgreSQL wists:Solving 'function "lexize" already exists with same argument types' in PostgreSQL simpy:Solving 'function "lexize" already exists with same argument types' in PostgreSQL newsvine:Solving 'function "lexize" already exists with same argument types' in PostgreSQL blinklist:Solving 'function "lexize" already exists with same argument types' in PostgreSQL furl:Solving 'function "lexize" already exists with same argument types' in PostgreSQL fark:Solving 'function "lexize" already exists with same argument types' in PostgreSQL blogmarks:Solving 'function "lexize" already exists with same argument types' in PostgreSQL Y!:Solving 'function "lexize" already exists with same argument types' in PostgreSQL smarking:Solving 'function "lexize" already exists with same argument types' in PostgreSQL magnolia:Solving 'function "lexize" already exists with same argument types' in PostgreSQL segnalo:Solving 'function "lexize" already exists with same argument types' in PostgreSQL
Trackbacks

Use the following link to trackback from your own site:
http://blog.bfccomputing.com/articles/trackback/4764

Comments

Leave a response

Comments