Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:38:26+00:00 2026-06-12T18:38:26+00:00

PostgreSQL 9.2 has native JSON support. I’d like to store human readable config files,

  • 0

PostgreSQL 9.2 has native JSON support. I’d like to store human readable config files, however, in YAML. And I think I’d like to index a few (but not all) of the config file values. Therefore I’m wondering:

  1. Is it’s somehow possible to include [a third party Javascript library that parses Yaml] in Postgres, for example js-yaml. Then I could have my own YAML Javascript helper, in the same way as there’s the built-in JSON helper in PostgreSQL 9.2.

Alternatively:

  1. is it possible to declare individual reusable Javascript functions? If so, then I could add my own YAML parsing functions (based on simple regexps), that are able to parse a subset of YAML, for example the top level key-value pairs here:

    # some "top level key-value paris":
    the_key: 'the value'
    another_key: 'another value'
    # But this however:
    would_be_too_complicated_to_parse_manually_with_regexps: |
      block string
      with newlines
    

Worst case scenario would be that I’d need to duplicate YAML parsing code in each PostgreSQL stored procedure (if I cannot add 3rd party libraries or declare reusable functions).

(Performance wouldn’t be terribly important in my case.)

(I’ve googled a while for “postgresql plv8 reusable function” and “postgresql plv8 library” but found nothing of relevance)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:38:27+00:00Added an answer on June 12, 2026 at 6:38 pm

    The pl/v8 procedural language is probably the way to go. It’s a ‘trusted’ language, which means (among other things) it does not provide any way to do the ‘load an external module from this file’ thing. But it does have a ‘find_function()’ method to let you define your own javascript function and call it from another function (js or not). See description of it in this blog post:
    http://umitanuki.hatenablog.com/entry/2012/04/10/171935

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PostgreSQL has allowed me to name a column campaign_$. I like the name because
Who has any documents that about PostgreSQL background processes? I'd like to learn the
The situation is something like this: PostgreSQL Database table has a field dateAdded which
Like everything else, it seems PostgreSQL has much more powerful/complex indexing for tables. Perhaps
Does MySql has the Interval datatype as PostgreSQL (or like TimeSpan in .net) does?
I have a client that has a PostgreSQL database and he cannot remember the
Has anyone successfully mapped a numeric array in PostgreSQL to a numeric array in
I'm converting a PHP script as DB has been switched from MySQL to PostgreSQL.
My site, which is built on Python/Postgresql with django, has an area where you
PostgreSQL has announced an Android app contest . I wanted to try out something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.