मैं यह नहीं जान सकता कि मैं PostgreSQL 9.3 डेटाटाइप में एक तत्व को कैसे अपडेट कर सकता हूं।
मेरा उदाहरण:
CREATE TABLE "user"
(
id uuid NOT NULL,
password character varying(255),
profiles json,
gender integer NOT NULL DEFAULT 0,
created timestamp with time zone,
connected timestamp with time zone,
modified timestamp with time zone,
active integer NOT NULL DEFAULT 1,
settings json,
seo character varying(255) NOT NULL,
CONSTRAINT id_1 PRIMARY KEY (id)
)
WITH (
OIDS=TRUE
);
ALTER TABLE "user"
OWNER TO postgres;
"प्रोफाइल" में json हिस्सा
{
"Facebook": {
"identifier": "xxxxxxxxxxx",
"profileURL": "none",
"webSiteURL": "none",
"photoURL": "none",
"displayName": "test2 test2",
"description": "none",
"firstName": "test2",
"lastName": "test2",
"gender": 2,
"language": "none",
"age": "none",
"birthDay": "none",
"birthMonth": "none",
"birthYear": "none",
"email": "test@test.com",
"emailVerified": "none",
"Added": null,
"phone": "none",
"address": "none",
"country": "none",
"region": "none",
"city": "none",
"zip": "none"
},
"Google": {
"identifier": "xxxxxxxxxxxxxxxxxxxxxx",
"profileURL": "none",
"webSiteURL": "none",
"photoURL": "none",
"displayName": "test2 test2",
"description": "none",
"firstName": "test2",
"lastName": "test2",
"gender": 2,
"language": "none",
"age": "none",
"birthDay": "none",
"birthMonth": "none",
"birthYear": "none",
"email": "test@test.com",
"emailVerified": "none",
"Added": null,
"phone": "none",
"address": "none",
"country": "none",
"region": "none",
"city": "none",
"zip": "none"
}
}
मैं दृश्यपटल के लिए x-edit का उपयोग कर रहा हूं, और मुझे उम्मीद थी कि ऐसा कुछ काम करेगा, लेकिन यह नहीं है:
UPDATE public.user
SET "profiles"->'Facebook'->'social'->'facebook' = 'test' WHERE` id='id'
मैं किसी भी जानकारी को खोजने के लिए प्रतीत नहीं कर सकता कि कैसे एक jatt datatype को अपडेट किया जाए।