Hey,
I've developed a database auditing/versioning using the JSON data type
(http://github.com/fxku/audit) and doing some tests now.
Unfortunately I'm facing some problems when dealing with tables that store
images as BYTEA. Some of them are around 15 MB big.
My tool logs changes to JSON and ca
Hey
i've also tried to implement a database versioning using JSON to log changes in
tables. Here it is: https://github.com/fxku/audit
I've got two versioning tables, one storing information about all transactions
that happened and one where i put the JSON logs of row changes of each table.
I'm
25 Uhr
Von: "Abelard Hoffman"
An: "Felix Kunde"
Cc: "pgsql-general@postgresql.org"
Betreff: Re: [GENERAL] table versioning approach (not auditing)
Thank you Felix, Gavin, and Jonathan for your responses.
Felix & Jonathan: both of you mention just storing deltas. B
014 um 21:16 Uhr
Von: "Adam Brusselback"
An: "Felix Kunde"
Cc: "pgsql-general@postgresql.org"
Betreff: Re: [GENERAL] table versioning approach (not auditing)
Felix, I'd love to see a single, well maintained project. For example, I just
found yours, and gave it a sho
Hi, not so long ago, I've asked myself the same question. I've written two
fuction that do this:
SELECT build_json(array_agg(to_json(old.key)), array_agg(old.value))
FROM json_each($1) old
LEFT OUTER JOIN json_each($2) new ON old.key = new.key
WHERE old.value::text <> new.value::text OR new.key
> I have some code which uses table_log
> (http://pgfoundry.org/projects/tablelog/) to keep a log of changes to
> selected tables.
> I don't use the restore part, just the logging part.
> It creates a new table for each table being logged, with several additional
> columns, and adds triggers
On Thu, 2017-11-09 at 17:01 +0530, Brahmam Eswar wrote:
> You can create a composite type in PostgreSQL:
> CREATE TYPE complex AS (r integer, i integer);
> You would use an array in this case:
> DECLARE
> carr complex[];
I've once faced the same thing, and did as Laurenz suggested.
You will like P
Hello
last december I've delvoped a few PL/pgSQL functions to log
all changes in my database and recreate former database states.
I used row_to_json to log and json_populate_recordset to reproduce
my tables. I think it's cool feature and I like to share and discuss it
with you. I would be v
I had a similar problem once. The pool is reusing connections and the temporary tables are still there.
Now I always create new temporary tables with a unique name like this:
tmpTableId = "TMP" + Math.abs(generateUUID().hashCode());
if (tmpTableId.length() > 15)
tmpTableId = tmpTableId.su
xt OR new.key IS NULL;
Everything works as expected, but it feels kinda ugly to me.
Any PG-JSON experts around to tell me a better solution?
Did i trapped into some "YouShouldNot"s?
Regards!
Felix Kunde
10 matches
Mail list logo