Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help on indexing

Help on indexing

Help on indexing

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.


RE: Help on indexing

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.


RE: Help on indexing

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.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close