Browse Source

Update PostgreSQL documentation (14.0)

Simon Legner 4 years ago
parent
commit
d0555957f7
2 changed files with 9 additions and 10 deletions
  1. 3 9
      lib/docs/filters/postgresql/entries.rb
  2. 6 1
      lib/docs/scrapers/postgresql.rb

+ 3 - 9
lib/docs/filters/postgresql/entries.rb

@@ -100,21 +100,14 @@ module Docs
         when 'queries-table-expressions'
           entries.concat get_heading_entries('h3[id], .sect3[id] > h3:first-child')
           entries.concat get_custom_entries('dt > .literal:first-child')
-        when 'functions-logical'
-          entries.concat get_custom_entries('> table td:first-child > code')
-        when 'functions-formatting'
-          entries.concat get_custom_entries('#FUNCTIONS-FORMATTING-TABLE td:first-child > code')
         when 'functions-admin'
-          entries.concat get_custom_entries('.table td:first-child > code')
-        when 'functions-string'
-          entries.concat get_custom_entries('> div[id^="FUNC"] td:first-child > code')
-          entries.concat get_custom_entries('> div[id^="FORMAT"] td:first-child > code')
+          entries.concat get_custom_entries('.table td:first-child > p:first-child > code.function')
         else
           if type && type.start_with?('Functions')
             entries.concat get_custom_entries('> .table td:first-child > code.literal:first-child')
             entries.concat get_custom_entries('> .table td:first-child > code.function:first-child')
             entries.concat get_custom_entries('> .table td:first-child > code:not(.literal):first-child + code.literal')
-            entries.concat get_custom_entries('> .table td:first-child > p > code.literal:first-child')
+            entries.concat get_custom_entries('> .table td:first-child > p:first-child > code.literal:first-child')
             entries.concat get_custom_entries('> .table td:first-child > p > code.function:first-child')
             entries.concat get_custom_entries('> .table td:first-child > p > code:not(.literal):first-child + code.literal')
             if slug == 'functions-comparison' && !at_css('#FUNCTIONS-COMPARISON-PRED-TABLE') # before 9.6
@@ -220,6 +213,7 @@ module Docs
           unless entries.any? { |entry| entry[0] == name }
             node['id'] = id
             entries << [name, id]
+            # puts [selector, name].join(' --> ')
           end
         end
       end

+ 6 - 1
lib/docs/scrapers/postgresql.rb

@@ -55,8 +55,13 @@ module Docs
       Licensed under the PostgreSQL License.
     HTML
 
+    version '14' do
+      self.release = '14.0'
+      self.base_url = "https://www.postgresql.org/docs/#{version}/"
+    end
+
     version '13' do
-      self.release = '13.2'
+      self.release = '13.4'
       self.base_url = "https://www.postgresql.org/docs/#{version}/"
     end