Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on indexing

Status
Not open for further replies.

Crazyec

Programmer
Aug 28, 2001
80
HK
Dear Pros,

Known that the Postgresql has limitation on the indexing.
And now, I need to make index on a column which 64000 characters in length.

Is there any method to change the limitation? or I need to do it in alternative way?

I have found someone said the changes of "NAMEDATALEN" in src/include/pg_config.h will work. But I can't find it in neither pg_config.h nor pg_config_manual.h

The version I'm using is 8.0.3

Thank very much.

Eric
 
At the top of my head, one thing you could try is adding another column of a type character array of size 64000. Then index that column. There is good documentation on defining and using arrays as columns.

I have never tried it myself (never needed to), but that's the first thing that hit me. I would be interested in knowing if that is a viable solution though.

Hope it helps.

Gary
gwinn7
 
Of course you would need to write function to serialize and dump the text column into the column holding the array. That shouldn't be difficult.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top