Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have to "translate" a MySQL SQL script (table and index creations basically) to PostgreSQL and have come across the following:

CREATE FULLTEXT INDEX param_description   ON info_param (description ASC) ;

Where description is a TEXT column.

Is there a straightforward way to directly translate the above into some indexing command in PostgreSQL 9.1 ?

share|improve this question

closed as not a real question by CBroe, Bhavin, Marc Audet, Florian Peschka, Neil May 28 '13 at 12:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    

1 Answer 1

up vote 1 down vote accepted

It's in the fine manual.

The full text search model in PostgreSQL is different in more than details of syntax. You will need to use different functions and operators to query the index. You cannot just run code written for MySQL's fulltext indexes against PostgreSQL's fulltext indexing.

share|improve this answer
    
Right, I was hoping for a more or less straightforward syntax-only translation. –  Marcus Junius Brutus May 27 '13 at 12:57
    
@MarcusJuniusBrutus You're out of luck, unfortunately. to_tsvector('english','some text here') @@ to_tsquery('english', 'te:*') isn't super similar to what MySQL uses ;-) –  Craig Ringer May 27 '13 at 13:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.