[Koha-devel] Experimental support for MARC records as a proper datatype in the PostgreSQL database

Mason James mtj at kohaaloha.com
Mon Jun 11 12:54:56 CEST 2012


On 2012-06-11, at 3:43 AM, Marc Balmer wrote:

> Sitting in one of the nice pubs in Edinburgh during KohaCon, I had this
> idea to add MARC records as a proper datatype to the PostgreSQL database
> server.  After a discussion with Marc Véron and Dobrica Pavlinusic about
> what that could mean, I decided to just try it and I have now a basic
> implementation (or, more a proof of concept).  So here is some
> information on this:
> 
> If MARC records are a proper datatype, that means they are stored right
> in the database, are backed-up, can be restored, replicated etc. just
> with the standard database tools.  If then a function is provided to
> access individual fields of a MARC record, then this can be used in SQL
> expressions, e.g. for selects or to create views etc.  As PostgreSQL
> supports functional indexes, you can create indexes on individual MARC
> fields, giving you super fast access to your data.



> 
> To access individual MARC fields, the function 'marc_field()' was
> created, it returns VARCHAR:
> 


wow, very impressive stuff!

could someone please paste the code of the 'marc_field() function?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 535 bytes
Desc: This is a digitally signed message part
URL: </pipermail/koha-devel/attachments/20120611/b85e8e01/attachment.pgp>


More information about the Koha-devel mailing list