Re: How to get the size of JSONB in bytes? - Mailing list pgsql-general

From Jim Nasby
Subject Re: How to get the size of JSONB in bytes?
Date
Msg-id 5670B5DC.3010101@BlueTreble.com
Whole thread Raw
In response to Re: How to get the size of JSONB in bytes?  (Petr Korobeinikov <pkorobeinikov@gmail.com>)
Responses Re: How to get the size of JSONB in bytes?  (Dmitry Savenko <ds@dsavenko.com>)
List pgsql-general
On 12/15/15 8:24 AM, Petr Korobeinikov wrote:
> The better approach is extract your length-validation logic into your
> application.

That's really up to interpretation.

The database is the only place the data is stored, and as such is the
only place that can constrain that data in all places.

If you're accepting data from a web form or something you certainly want
it to also check things, so the user gets immediate feedback. But for
anything you need to guarantee, you need to use the database.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Trigger function, C, lookup of attribute type
Next
From: Jim Nasby
Date:
Subject: Re: wal receiver process always start after startup process recovering all WALs and need new WAL?