ly2pg
Import LilyPond files into PostgreSQL
pgwtc · Import LilyPond files into PostgreSQL
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (ly2pg.control)
- Official extension SQL (ly2pg–0.1.sql)
ly2pg — This directory contains two extensions for PostgreSQL 17:. Use it when moving, transforming, or integrating the corresponding data from PostgreSQL. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
clavis2lilypond(IN clavis , OUT key text , OUT is_maior boolean)is an extension function and returnsrecord.clavis2nota(IN clavis , nota OUT nota , is_maior OUT boolean)is an extension function and returnsrecord.duration2ticks(text)is an extension function and returnsint.int_error(text)is an extension function and returnsint.lilypond(nota)is an extension function and returnstext.lilypond(nota, text)is an extension function and returnstext.lilypond(nota, text[])is an extension function and returnstext.lilypond_book_subjects()is an extension function and returnsSETOF text.lilypond_voice(src text , vox vox , start_id int DEFAULT NULL , max_count bigint DEFAULT NULL , add_key boolean DEFAULT false , add_time boolean DEFAULT false , add_clef boolean DEFAULT false , add_rest boolean DEFAULT false)is an extension function and returnstext.nota(jsonb)is an extension function and returnsnota.nota_add(nota, int)is an extension function and returnsnota.nota_at_clavis(nota, clavis)is an extension function and returnsint.tempo(text)is an extension function and returnstempo.tempo2text(tempo)is an extension function and returnstext.
Requirements and Caveats
- The reviewed control file declares default version
0.1. - The control file marks the extension as non-relocatable.
- The control file does not require superuser-only installation.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.