Skip to content

ricardo malla's blog

  • home
  • remote cto
  • it
    • o/s
    • databases
    • software
  • life
    • gamechangers
    • tv series
    • blogs to follow
    • books to read
    • health
  • ideas
  • notes
  • hire us
Search

ricardo malla's blog

Close menu
  • home
  • remote cto
  • it
    • o/s
    • databases
    • software
  • life
    • gamechangers
    • tv series
    • blogs to follow
    • books to read
    • health
  • ideas
  • notes
  • hire us

ricardo malla's blog

Search Toggle menu

Category: databases

February 28, 2017postgresql

postgresql: limit 1 on group by

It's stupidly complicated to get just one record per group on a PostgreSQL query... After an hour of trial and error this […]

November 2, 2016postgresql

pgsql: cannot alter character length because of dependant views

  SQL error: ERROR: cannot alter type of a column used by a view or rule DETAIL: rule _RETURN on view rv_warehouseprice […]

October 10, 2016October 10, 2016postgresql

postgresql: table sizes

SELECT *, pg_size_pretty(total_bytes) AS total , pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast , pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) […]

October 4, 2016October 4, 2016mysql

mysql: enable logging

mysql> show variables like '%log%'; Recreate the log files I deleted by mistake. It appears the MySQL does not recreate them automatically. […]

September 16, 2016mysql, postgresql

csv import manual

Remove Commas from strings Truncate String Length using LEFT function in Excel Use CLEAN Function to remove unwanted breaks and non displaying […]

September 16, 2016mysql, postgresql

sql query: remove leading and trailing double quotes

UPDATE m_product SET name = TRIM(BOTH '"' FROM name) WHERE m_product_id = '1128493' UPDATE m_product set name = replace(name, '""', '"') WHERE […]

September 8, 2016September 8, 2016idempiere, postgresql

idempiere: alter sequence

Update M_Product_ID UPDATE ad_sequence SET currentnext = 1026150 WHERE ad_sequence_id = 114 Update Product PriceList UPDATE ad_sequence SET currentnext = 1026138 WHERE ad_sequence_id […]

July 28, 2016postgresql

postgresql: find biggest tables on your database

Excecute the following command on phpPgAdmin on the SQL Tab.   SELECT table_name, pg_size_pretty(table_size) AS table_size, pg_size_pretty(indexes_size) AS indexes_size, pg_size_pretty(total_size) AS total_size […]

July 28, 2016August 17, 2016postgresql

postgresql: restore db from sql

#Upload the backup .sql file to the server #Execute the following command. root@ubuntu:~# psql -Uadempiere idempiere < /opt/idempiere-server/DBImport/DB3.sql

July 18, 2016August 8, 2016postgresql

postgresql: update column from another table's column

UPDATE c_order SET po_refernce_no = (SELECT po_refernce_no FROM "Import" WHERE c_order_id = c_order.c_order_id), tracking_number = (SELECT tracking_number FROM "Import" WHERE c_order_id = […]

Posts pagination

< 1 2 3 4 >

Recent Posts

  • b2b social media basic stack
  • histamine intolerance
  • prestashop returning 302 instead of 404 for unexistent pages
  • fail2ban: audit
  • postgres grant commands
  • troubleshoot high cpu from mysql on ubuntu
  • ubuntu: replace text inside file
  • view wifi password on windows 11
  • python: upgrade all python modules on windows 11
  • office365: forward NDRs to shared mailbox

Categories

  • adempiere (1)
  • android (1)
  • apache (3)
  • asterisk (11)
  • backup strategies (3)
  • blogs to follow (1)
  • centos (1)
  • documentaries (1)
  • dropbox (2)
  • elasticsearch (1)
  • email marketing (3)
  • emfs (1)
  • esxi (1)
  • fail2ban (1)
  • finance (1)
  • gamechangers (5)
  • gamechanging concepts (2)
  • google (1)
  • google cloud (1)
  • health (3)
  • history (1)
  • ideas (1)
  • idempiere (16)
  • it (1)
  • java (8)
  • laptop (1)
  • legal (1)
  • life (2)
  • magento (6)
  • management (1)
  • mautic (9)
  • microbiome (1)
  • microsoft stack (5)
  • mysql (18)
  • nginx (1)
  • notes (1)
  • o/s (1)
  • openbravo (37)
  • openerp/odoo (6)
  • openvpn (1)
  • outlook (1)
  • pentaho (1)
  • pfsense (6)
  • php (4)
  • phplist (1)
  • phpmyadmin (1)
  • pingdom (1)
  • podcasts (2)
  • podcasts (1)
  • podcasts (1)
  • postfix (1)
  • postgresql (19)
  • prestashop (22)
  • procurement (1)
  • productivity (2)
  • python (3)
  • sales (1)
  • scrapy (1)
  • seo (1)
  • shell (3)
  • software (3)
  • spacy (1)
  • splunk (1)
  • sugarcrm (19)
  • synology (2)
  • sys admin (2)
  • talend (3)
  • tibco - jasper reports (20)
  • tv series (1)
  • ubuntu (26)
  • uncategorized (229)
  • unifi (3)
  • virtualbox (1)
  • virtualization (1)
  • vmware (5)
  • wordpress (2)
  • zoiper (1)
© 2025 ricardo malla's blog. Proudly powered by Sydney