Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Posts
    2

    Unanswered: Help me, please, with pl/pgsql function

    Dear All,

    In my pl/pgsql function I need to replace placeholders in a string like '%2x%1%3' with corresponding fields values from a RECORD-type variable.

    F.ex.
    FOR myrec IN (SELECT dim_1, dim_2, ... FROM table1, ... WHERE ... ORDER BY ...) LOOP

    <here I need code that would replace the placeholders %X in format string with actual values of the corresponding fields dim_X>

    END LOOP;

    Unfortunately all my attempts to write this code with pl/pgsql had no success.

    I would highly appreciate any suggestion/hint/idea/example that could help to solve my problem.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Have you checked the pg documentation?

    Also, if you would show us what you've already tried, we could give you pointers.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •