Ho la seguente struttura jsonb:Come posso eseguire una query LIKE per una chiave jsonb?
{'this': '1', 'this_that': '0', 'this_and_that': '5'}
Come faccio a selezionare le righe che contengono un operatore LIKE?
SELECT * FROM myjson WHERE j ? 'this_%'
Restituisce 0 righe ... sperava che corrispondesse 'this_that' e 'this_and_that'. (Nota: i caratteri che seguono '_' potrebbero variare notevolmente e quindi non sono in grado di fare una corrispondenza esatta).
qual è la versione esatta di PostgreSQL che stai utilizzando? eseguire 'select version()' –
PostgreSQL 9.4.1 su x86_64-unknown-linux-gnu, compilato da gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1, 64-bit –