SELECT DISTINCT ON (asin) asin, price, reviews, raing
(SELECT array_agg(j) FROM (SELECT DISTINCT ON (j.asin) j FROM jsonb_populate_recordset(NULL::t_best_asin_ranking_2, '[{
"asin":"B06XH9FNH1",
"price": 1.5,
"rating": 1.5,
"reviews": 1
}]') j ORDER BY j.asin) r);
melkij=> SELECT * from ts_debug('russian', 'дело сделать кот наконец то');
alias | description | token | dictionaries | dictionary | lexemes
-------+-------------------+---------+----------------+--------------+---------
word | Word, all letters | дело | {russian_stem} | russian_stem | {дел}
blank | Space symbols | | {} | |
word | Word, all letters | сделать | {russian_stem} | russian_stem | {сдела}
blank | Space symbols | | {} | |
word | Word, all letters | кот | {russian_stem} | russian_stem | {кот}
blank | Space symbols | | {} | |
word | Word, all letters | наконец | {russian_stem} | russian_stem | {}
blank | Space symbols | | {} | |
word | Word, all letters | то | {russian_stem} | russian_stem | {}
(9 строк)
lexemes text[] — the lexeme(s) produced by the dictionary that recognized the token, or NULL if none did; an empty array ({}) means it was recognized as a stop word
melkij=> SELECT ts_lexize('russian_stem', 'наконец');
ts_lexize
-----------
{}
ts_lexize returns an array of lexemes if the input token is known to the dictionary, or an empty array if the token is known to the dictionary but it is a stop word, or NULL if it is an unknown word.
select hotel_id, category, sum(price) as total_price from hotel_prices where date between ? and ? and not on_stop_sale group by 1,2 having count(*) = количество_дней_в_диапазоне order by total_price
Как функция index scan в postgresql понимает тип индекса?
и как именно Postgre понимает, какую функцию следует применять
ALTER TYPE name ADD VALUE [ IF NOT EXISTS ] new_enum_value [ { BEFORE | AFTER } neighbor_enum_value ]
ALTER TYPE name RENAME VALUE existing_enum_value TO new_enum_value
удаляется мало, добавляется пачками ( где то 10 миллионов в день )
не удаляется и не обновляется ничего