All pastes #948664 Raw Edit

Something

public text v1 · immutable
·published 2008-03-19 11:08 UTC
rendered paste body
CREATE OR REPLACE VIEW streets AS
 select

  gid ,
  cat ,
  stseg ,
  stid ,
  stname,
  dir_pre ,
  dir_suf,
  stype ,
  "class" ,
  f_elev ,
  t_elev ,
  map ,
  priv ,
  frleft ,
  toleft,
  frright,
  toright,
  frleft_a,
  toleft_a ,
  frright_a,
  toright_a,
  stateroad,
  cartoname,
  corp ,
  speed ,
  one_way ,
  classname ,
  l_zipname ,
  r_zipname,
  ft_cost ,
  tf_cost ,
  labelname ,
  f_node,
  t_node,
  cartolevel,
  shape_len ,
  the_geom ,
  source ,
  target ,
  length ,
  x1 ,
  y1,
  x2 ,
  y2,
  reverse_cost ,
  to_cost ,
  "rule",
  rcost ,
  reason,
  case unavailable_until < current_timestamp
                        when true then 1 else 0 end as status,
@@  case when status = 1 then reason = ''
 from streets_proper    ;