or "post-gres-cue-ell", not "post-gray-something". I heard people making this same mistake in presentations at this past weekend's Postgres Anniversary Conference :-( Arguably, the 1996 decision to call it PostgreSQL instead of reverting to plain Postgres was the single worst mistake this project ever made. It seems far too late to change now, though. ! ! ! regards, tom lane http://www.postgresql.org/message-id/[email protected]
date double precision inet integer interval line lseg macaddr money numeric path point polygon real smallint smallserial serial text time time with time zone timestamp timestamp with time zone tsquery tsvector uuid xml json bit varying
date double precision inet integer interval line lseg macaddr money numeric path point polygon real smallint smallserial serial text time time with time zone timestamp timestamp with time zone tsquery tsvector uuid xml json bit varying
PRIMARY KEY DEFAULT uuid_generate_v4(), ! email character varying(255), ! data hstore DEFAULT '', ! created_at timestamp with time zone DEFAULT now(), ! updated_at timestamp with time zone DEFAULT now() ); INSERT INTO users (email, data) VALUES ('[email protected]', 'homepage => "http://nuclearsquid.com", github => "cypher", twitter => "nuclearsquid", adn => "cypher", "a key" => "a value"');
set_of_records() RETURNS SETOF rec AS $$ // plv8.return_next() stores records in an internal tuplestore, // and return all of them at the end of function. plv8.return_next( { "i": 1, "t": "a" } ); plv8.return_next( { "i": 2, "t": "b" } ); // You can also return records with an array of JSON. return [ { "i": 3, "t": "c" }, { "i": 4, "t": "d" } ]; $$ LANGUAGE plv8; DO $$ plv8.elog(NOTICE, 'this', 'is', 'inline', 'code') $$ LANGUAGE plv8;
nght')) <= 3; ┌──────────┬────────────────────┐ │ movie_id │ title │ ├──────────┼────────────────────┤ │ 245 │ A Hard Day's Night │ └──────────┴────────────────────┘
┌───────────────────────────────┐ │ title │ ├───────────────────────────────┤ │ A Hard Day's Night │ │ Six Days Seven Nights │ │ Long Day's Journey Into Night │ └───────────────────────────────┘
& day'); ┌───────────────────────────────┐ │ title │ ├───────────────────────────────┤ │ A Hard Day's Night │ │ Six Days Seven Nights │ │ Long Day's Journey Into Night │ └───────────────────────────────┘
│ actor_id │ name │ ├──────────┼──────┤ └──────────┴──────┘ SELECT * FROM actors WHERE name % 'Broos Wils'; ┌──────────┬──────┐ │ actor_id │ name │ ├──────────┼──────┤ └──────────┴──────┘
WHERE metaphone(name, 6) = metaphone('Broos Wils', 6); ┌─────────────────────────────┐ │ title │ ├─────────────────────────────┤ │ The Fifth Element │ │ Twelve Monkeys │ │ Armageddon │ │ Die Hard │ │ Pulp Fiction │ │ The Sixth Sense │ │ Blind Date │ │ Die Hard with a Vengeance │ …
FROM department WHERE name = 'A' UNION ALL -- recursive term SELECT d.* FROM department AS d JOIN subdepartment AS sd ON (d.parent_department = sd.id) ) SELECT * FROM subdepartment ORDER BY name;
"work_available" with payload "44924" received from server process with PID 77946. B> SELECT pg_notify('work_available', '1337'); A> Asynchronous notification "work_available" with payload "1337" received from server process with PID 77946.