title: How to get full tree node path in reverse order in PostgreSQL?
body: <p>I have the following table</p>
  
  <pre><code>CREATE TABLE descriptor_value (
      id bigint NOT NULL,
      value varchar(250),
      parent_id bigint
  ) ;
  </code></pre>
  
  <p><code>id</code> column is the primary key.</p>
  
  <p>And I have three rows</p>
  
  <pre><code>id | value | parent_id
  ----------------------
  1  | foo   | null
  2  | bar   | 1
  3  | baz   | 2
  </code></pre>
  
  <p>And I need to create view that will show full path of <code>every</code> node in reverse order. For example, if we consider only baz there must be the following output:</p>
  
  <pre><code>child_id | parent_id | level
  ----------------------------
   3       | 3         | 1
   3       | 2         | 2    
   3       | 1         | 3
  </code></pre>
  
  <p>Could anyone say how to do it in PgSQL 12?</p>