1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-13 12:22:55 +03:00
Files
postgres/src/test/regress/sql/create_view.sql
1997-04-06 06:07:13 +00:00

21 lines
462 B
SQL

--
-- VIRTUAL CLASS DEFINITIONS
-- (this also tests the query rewrite system)
--
CREATE VIEW street AS
SELECT r.name, r.thepath, c.cname AS cname
FROM road r, real_city c
WHERE c.outline ## r.thepath;
CREATE VIEW iexit AS
SELECT ih.name, ih.thepath,
interpt_pp(ih.thepath, r.thepath) AS exit
FROM ihighway ih, ramp r
WHERE ih.thepath ## r.thepath;
CREATE VIEW toyemp AS
SELECT name, age, location, 12*salary AS annualsal
FROM emp;