PostgreSQL 9.6.1
Hi
I have a NULL-able JSONB type column and want to perform upsert,
concatenating with the existing value.
The query looks like (campaigns and facts columns are JSONB type, in the
below) :
INSERT INTO Fan (oid, campaigns, facts) VALUES (189,'{"campaign-id":
"12345"}','{
on writes:
On Sun, Dec 18, 2016 at 6:08 PM, John R Pierce wrote:
On 12/18/2016 2:52 PM, Jong-won Choi wrote:
I have a NULL-able JSONB type column and want to perform upsert,
concatenating with the existing value.
NULL does not mean 'NO' value in SQL it means UNKNOWN val
I have a RLS policy definition like:
CREATE POLICY promoter_policy ON Agency
USING (promoter in build_valid_promoter_list())
WITH CHECK (promoter in build_valid_promoter_list());
The build_valid_promoter_list function definition is:
CREATE OR REPLACE FUNCTION bu
END
$$;
Have a great weekend!
- Jong-won
On 03/02/17 17:14, Tom Lane wrote:
> Jong-won Choi writes:
>> I have a RLS policy definition like:
>> CREATE POLICY promoter_policy ON Agency
>> USING (promoter in build_valid_promoter_list())
>
Hi all,
This is from my local PostgreSQL log:
LOG: statement: begin;
LOG: statement: INSERT INTO site_owner (email, name, pwhash, data)
VALUES ('xyz', 'xyz', crypt('xyz', gen_salt('bf', 8)), '{}'::JSONB)
RETURNING id;
LOG: statement: INSERT INTO site (owner, name, timezone, data) VALUE
Hi all,
In my program, I generate SQLs from definitions, an example is:
(define-db-resource Event
[{:oid{:type :bigserial :primary-key true}}
{:name{:type :text :not-null true}}
{:tour-oid {:type :bigint :not-null true :references [Tour :oid]}}
{:tour
I've just found array_remove!
Cheers
- Jong-won
On 01/03/17 12:31, Jong-won Choi wrote:
Hi all,
In my program, I generate SQLs from definitions, an example is:
(define-db-resource Event
[{:oid{:type :bigserial :primary-key true}}
{:name{:type :text :not-null