PostgreSQL JSONB Operators
PostgreSQL JSONB Operators is a SQL function in the PostgreSQL Specific category. PostgreSQL JSONB operators for querying and manipulating JSON data with GIN index support. It accepts see syntax. It returns jSONB query result. A typical example: CREATE TABLE logs (data JSONB); CREATE INDEX ON logs USING GIN(data); -- Insert: INSERT INTO logs VALUES ('{"user": "Alice", "action": "login", "ip": "10.0.0.1"}'); -- Query operators: -- -> returns JSON (with quotes for strings) -- ->> returns text (no quotes) -- ? key exists -- ?| any key exists -- ?& all keys exist -- @> contains -- <@ contained by SELECT data->'user' FROM logs; -- "Alice" (JSON) SELECT data->>'user'… A close relative is SERIAL, which postgreSQL auto-increment type. Creates an INTEGER column with a sequence. Equivalent to AUTO_INCREMENT in MySQL. A close relative is RETURNING, which postgreSQL extension that returns values from INSERT/UPDATE/DELETE statements (like OUTPUT in SQL Server).