===== creating new video database... ===== Welcome to the C POSTGRES terminal monitor Go * Query sent to backend is "retrieve (x=1) " --------------- | x | --------------- | 1 | --------------- Go * Query sent to backend is "define type city_budget ( internallength = 16, input = int44in, output = int44out, element = int4) " DEFINE Go * Query sent to backend is "create person (name = char16, age = int4, location = point) " CREATE Go * Query sent to backend is "create emp (salary = int4, dept = char16) inherits (person) " CREATE Go * Query sent to backend is "create student (gpa = float8) inherits (person) " CREATE Go * Query sent to backend is "create stud_emp (percent = int4) inherits (emp, student) " CREATE Go * Query sent to backend is "create dept (dname = char16, mgrname = char16) " CREATE Go * Query sent to backend is "create city (name = char16, location = box, budget = city_budget) " CREATE Go * Query sent to backend is "define function boxarea ( language = "c", returntype = int4) arg is (box) as "/paquetes/postgres/video/boxarea.o" " DEFINE Go * Query sent to backend is "define function overpaid ( language = "c", returntype = bool) arg is (emp) as "/paquetes/postgres/video/overpaid.o" " DEFINE Go * Query sent to backend is "load "/paquetes/postgres/video/overpaid.o" " LOAD Go * Query sent to backend is "load "/paquetes/postgres/video/boxarea.o" " LOAD Go * Query sent to backend is "append person (name = "mike", age = 40, location = "(3.1,6.2)"::point) " APPEND 808239 Go * Query sent to backend is "append person (name = "joe", age = 20, location = "(5.5,2.5)"::point) " APPEND 808240 Go * Query sent to backend is "append person (name = "greg", age = 50, location = "(5.0,2.0)"::point) " APPEND 808241 Go * Query sent to backend is "append person (name = "bob", age = 18, location = "(0.0,0.0)"::point) " APPEND 808242 Go * Query sent to backend is "append dept (dname = "toy", mgrname = "sharon") " APPEND 808243 Go * Query sent to backend is "append dept (dname = "shoe", mgrname = "bob") " APPEND 808244 Go * Query sent to backend is "append emp (name = "bill", age = 20, location = "(11.0,10.0)"::point, salary = 1000, dept = "toy") " APPEND 808245 Go * Query sent to backend is "append emp (name = "sharon", age = 25, location = "(15.0,12.0)"::point, salary = 500, dept = "shoe") " APPEND 808246 Go * Query sent to backend is "append emp (name = "sam", age = 30, location = "(10.0,5.0)"::point, salary = 300, dept = "toy") " APPEND 808247 Go * Query sent to backend is "append student (name = "fred", age = 28, location = "(3.1,-1.5)"::point, gpa = 3.7) " APPEND 808248 Go * Query sent to backend is "append student (name = "larry", age = 60, location = "(21.8,4.9)"::point, gpa = 3.1) " APPEND 808249 Go * Query sent to backend is "append stud_emp (name = "jeff", age = 23, location = "(8.0,7.7)"::point, salary = 600, dept = "candy", gpa = 3.5) " APPEND 808250 Go * Query sent to backend is "append stud_emp (name = "cim", age = 30, location = "(10.5,4.7)"::point, salary = 400, dept = "shoe", gpa = 3.4) " APPEND 808251 Go * Query sent to backend is "append stud_emp (name = "linda", age = 19, location = "(0.9,6.1)"::point, salary = 100, dept = "candy", gpa = 2.9) " APPEND 808252 Go * Query sent to backend is "append city (name = "berkeley", location = "(0.0,0.0,10.0,10.0)"::box, budget = "250, 300, 325, 275"::city_budget) " APPEND 808253 Go * Query sent to backend is "append city (name = "oakland", location = "(-10.0,-10.0,0.0,5.0)"::box, budget = "600, 400, 350, 500"::city_budget) " APPEND 808254 Go * Query sent to backend is "append city (name = "elcerrito", location = "(10.0,0.0, 20.0,10.0)"::box, budget = "100, 100, 100, 100"::city_budget) " APPEND 808255 Go * Query sent to backend is "append city (name = "richmond", location = "(20.0,5.0, 35.0,15.0)"::box, budget = "300, 320, 340, 360"::city_budget) " APPEND 808256 Go * Query sent to backend is "append city (name = "sanpablo", location = "(35.0,20.0,40.0,30.0)"::box, budget = "50, 60, 65, 70"::city_budget) " APPEND 808257 Go * Query sent to backend is "create slow_emp4000 (location = box) " CREATE Go * Query sent to backend is "create fast_emp4000 (location = box) " CREATE Go * Query sent to backend is "copy slow_emp4000 from "/paquetes/postgres/video/rect_data" " COPY Go * Query sent to backend is "copy fast_emp4000 from "/paquetes/postgres/video/rect_data" " COPY Go * Query sent to backend is "define index rect2ind on fast_emp4000 using rtree (location bigbox_ops) " DEFINE Go * Query sent to backend is "retrieve (emp.all) " ----------------------------------------------------------------------- | location | age | name | salary | dept | ----------------------------------------------------------------------- | (11,10) | 20 | bill | 1000 | toy | ----------------------------------------------------------------------- | (15,12) | 25 | sharon | 500 | shoe | ----------------------------------------------------------------------- | (10,5) | 30 | sam | 300 | toy | ----------------------------------------------------------------------- Go * Query sent to backend is "retrieve (dept.all) " ----------------------------- | dname | mgrname | ----------------------------- | toy | sharon | ----------------------------- | shoe | bob | ----------------------------- Go * Query sent to backend is " retrieve (e.name) from e in emp, m in emp, d in dept where e.dept = d.dname and d.mgrname = m.name and e.salary > m.salary " --------------- | name | --------------- | bill | --------------- Go * Query sent to backend is "retrieve (city.all) " ------------------------------------------- | name | location | budget | ------------------------------------------- | berkeley | (10,10,0,0) | 250 300 325 275| ------------------------------------------- | oakland | (0,5,-10,-10)| 600 400 350 500| ------------------------------------------- | elcerrito | (20,10,10,0)| 100 100 100 100| ------------------------------------------- | richmond | (35,15,20,5)| 300 320 340 360| ------------------------------------------- | sanpablo | (40,30,35,20)| 50 60 65 70 | ------------------------------------------- Go * Query sent to backend is " retrieve (city.name) where boxarea(city.location) > 100 " --------------- | name | --------------- | oakland | --------------- | richmond | --------------- Go * Query sent to backend is " retrieve (emp.name) where overpaid(emp) " --------------- | name | --------------- | bill | --------------- Go * Query sent to backend is " retrieve (stud_emp.all) where overpaid (stud_emp) " --------------------------------------------------------------------------------------------------- | gpa | dept | salary | name | age | location | percent | --------------------------------------------------------------------------------------------------- Go * Query sent to backend is " retrieve (c1.name, c2.name) from c1 in city, c2 in city where c1.location && c2.location " ----------------------------- | name | name | ----------------------------- | berkeley | berkeley | ----------------------------- | oakland | berkeley | ----------------------------- | elcerrito | berkeley | ----------------------------- | berkeley | oakland | ----------------------------- | oakland | oakland | ----------------------------- | berkeley | elcerrito | ----------------------------- | elcerrito | elcerrito | ----------------------------- | richmond | elcerrito | ----------------------------- | elcerrito | richmond | ----------------------------- | richmond | richmond | ----------------------------- | sanpablo | sanpablo | ----------------------------- Go * Query sent to backend is " retrieve (fast_emp4000.all) where fast_emp4000.location && "(24000,24000,26000,26000)" " --------------- | location | --------------- | (25345,2,24019,3,25313,2,24017)| --------------- | (25051,3,25042,3,25011,3,25001)| --------------- | (25044,3,25088,3,25015,3,25005)| --------------- | (25007,3,25061,3,25002,3,25013)| --------------- | (25066,3,25105,3,25003,3,25007)| --------------- | (25028,3,25012,3,25015,3,25011)| --------------- | (25031,3,25057,3,25006,3,25018)| --------------- | (25015,3,25042,3,25004,3,25012)| --------------- | (25091,3,25049,3,25019,3,25019)| --------------- | (25023,3,25011,2,25000,3,25004)| --------------- | (25053,3,25104,3,25010,3,25012)| --------------- | (25058,3,25001,3,25018,2,25000)| --------------- | (25059,3,25051,3,25008,3,25016)| --------------- | (25043,3,25069,3,25007,3,25004)| --------------- | (25006,3,25101,3,25002,3,25002)| --------------- | (25095,3,25012,3,25014,3,25007)| --------------- | (25054,3,25052,3,25019,3,25013)| --------------- | (25108,3,25077,3,25009,3,25018)| --------------- | (25007,3,25023,3,25003,3,25002)| --------------- | (25076,3,25098,3,25002,3,25016)| --------------- | (25030,3,25077,3,25012,3,25006)| --------------- | (24497,2,24752,2,24411,2,24710)| --------------- | (24738,3,25458,2,24656,3,25362)| --------------- | (24704,3,25422,2,24635,3,25340)| --------------- Go * Query sent to backend is " retrieve (slow_emp4000.all) where slow_emp4000.location && "(24000,24000,26000,26000)" " --------------- | location | --------------- | (24497,2,24752,2,24411,2,24710)| --------------- | (24738,3,25458,2,24656,3,25362)| --------------- | (24704,3,25422,2,24635,3,25340)| --------------- | (25345,2,24019,3,25313,2,24017)| --------------- | (25051,3,25042,3,25011,3,25001)| --------------- | (25044,3,25088,3,25015,3,25005)| --------------- | (25007,3,25061,3,25002,3,25013)| --------------- | (25066,3,25105,3,25003,3,25007)| --------------- | (25028,3,25012,3,25015,3,25011)| --------------- | (25031,3,25057,3,25006,3,25018)| --------------- | (25015,3,25042,3,25004,3,25012)| --------------- | (25091,3,25049,3,25019,3,25019)| --------------- | (25023,3,25011,2,25000,3,25004)| --------------- | (25053,3,25104,3,25010,3,25012)| --------------- | (25058,3,25001,3,25018,2,25000)| --------------- | (25059,3,25051,3,25008,3,25016)| --------------- | (25043,3,25069,3,25007,3,25004)| --------------- | (25006,3,25101,3,25002,3,25002)| --------------- | (25095,3,25012,3,25014,3,25007)| --------------- | (25054,3,25052,3,25019,3,25013)| --------------- | (25108,3,25077,3,25009,3,25018)| --------------- | (25007,3,25023,3,25003,3,25002)| --------------- | (25076,3,25098,3,25002,3,25016)| --------------- | (25030,3,25077,3,25012,3,25006)| --------------- Go * Query sent to backend is "define rule example_1 is on replace to emp.salary where current.name = "bill" do replace emp (salary = new.salary) where emp.name = "sam" " DEFINE Go * Query sent to backend is "retrieve (emp.salary) where emp.name = "sam" " --------------- | salary | --------------- | 300 | --------------- Go * Query sent to backend is "replace emp (salary = 6000) where emp.name = "bill" " REPLACE Go * Query sent to backend is "retrieve (emp.salary) where emp.name = "sam" " --------------- | salary | --------------- | 6000 | --------------- Go * Query sent to backend is "define view toyemp (emp.name, emp.age, emp.location, annualsal = 12*emp.salary) where emp.dept = "toy" " WARN:Jun 14 10:19:54:parser: syntax error at or near "000000" Go * Query sent to backend is "retrieve (toyemp.all) " WARN:Jun 14 10:19:54:prs2GetLocksFromRelation: no rel with name 'toyemp' Go * Query sent to backend is " create toyemp2(name = char16, age = int4, location = point, annualsal = int4) "