I use the standard Ubuntu P-SQL and Perl for this simple test.

Um, what test? You didn't show us any test -- no sample input data, no output, no code, and no clear explanation or example of what you mean when you say "it doesn't work".

Maybe you are missing something obvious, but you haven't given us anything to work with yet. As indicated above, it's not even clear that this is a perl question.

Update: You said:

I want to sort data in a PostgreSQL table in the same way as in large Perl data structures. (To cache large data structures transparently in the db)

But, there are lots of ways of sorting large perl data structures -- and lots of different kinds of structures that involve different methods for implementing various ways of sorting -- and there may even be ways to "cache large data structures transparently in the db" that do not require any kind of sorting.

Your posts in this thread so far have all been very vague and unclear. If this really is (or could be) a perl question, give us a better idea of what you are talking about. (Maybe you just need to add an extra column to your table(s), to specify the desired ordering for the data records.)


In reply to Re: Postgresql and space characters by graff
in thread Postgresql and space characters by BerntB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.