storage-common/pgsql/vtriples.sql

12 lines
356 B
SQL

create or replace view vtriples as
select triples.id,
stype, svalue, show(stype, svalue) as stext,
predicate, show(dt.id, predicate) as ptext,
otype, ovalue, show(otype, ovalue) as otext,
events.tstamp as ts
from triples, datatypes dt, events
where dtname = 'node'
and events.id = creation
and deletion is null
;