Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. got this error: 'HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2. so I did:
  3. 1.alter table sp30_subset alter column arrivtime type timestamp using to_timestamp(arrivtime, 'YYYY-MM-DD hh24:mi:ss')::timestamp without time zone;
  4. 2.CREATE INDEX idx_sp30_subset_ts_inverse ON sp30_subset (user_id,geom, arrivtime, leavetime DESC);
  5. 3.CREATE INDEX idx_sp30_subset_funky ON sp30_subset USING gist (tsrange(arrivtime, leavetime, '[]'));
  6. 4.create temporary table mix as (select a.user_id id_x, a.arrivtime arriv_x, a.leavetime leav_x,
  7. h.user_id id_y, h.arrivtime arriv_y, h.leavetime leav_y from ali a, hasan h);
  8. 5.select * from mix where tsrange(arriv_y, leav_y,'[]') && tsrange(arriv_x, leav_x,'[]');
  9.  
  10. ## how to call a function in plpgsql:
  11. func: sales_tax()
  12. select sales_tax("pr_id") from sp30_subset;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement