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: postgresql

August 17, 2018August 17, 2018postgresql

pgsql: create table inside database

Example   CREATE TABLE c_ordernotes ( c_ordernotes_id numeric(10,0) CONSTRAINT firstkey PRIMARY KEY, ad_client_id numeric(10,0) NOT NULL, ad_org_id numeric(10,0) NOT NULL, isactive character(1), […]

December 24, 2017December 24, 2017idempiere, postgresql

delete duplicate rows on pgsql and mysql

This code shows how to delete duplicate rows on pgsql    DELETE FROM m_product WHERE sku in( SELECT sku FROM ( SELECT […]

November 4, 2017November 4, 2017postgresql

pgsql: replace add break

UPDATE m_product SET em_mg_longdescription = regexp_replace(em_mg_longdescription,'------------',chr(13)) WHERE em_mg_manufacturer = 1000637 AND value = 'IMI-YW356A01'     Some additional replace scripts   UPDATE […]

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) […]

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 […]

Posts pagination

1 2 >

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