Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. PSQL Query Execute v 19.0
  4. Sales Conditions FAQ

PSQL Query Execute

by SDLC Corp https://sdlccorp.com
Odoo
v 19.0 Third Party 99
Download for v 19.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 15.0 16.0 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 15.0 16.0 17.0 18.0 19.0 20.0
  • Description
  • Manifest

PSQL Query Tool for Odoo 19

Run PostgreSQL Queries
Inside Odoo.

Debug data, validate records and build ad-hoc reports without leaving the backend. Read-only by default, enforced by PostgreSQL itself, with a dedicated access group, an audit log of every execution and CSV / XLSX export.

Read‑only
By default, enforced by PostgreSQL
CSV + XLSX
Export, logged
Audit
Log of every run
Odoo 19
Built & Tested
LGPL‑3
Open License

A guarded SQL console for the people who actually query the database.

Own PSQL Query app, only for members of its access groups
One statement per run, read-only savepoint, timeout and row limit
Paginated, escaped results; CSV and XLSX export
Saved, shareable queries with :name parameters and full history
psql.query
SELECT id, name, email
FROM res_partner
WHERE customer_rank > 0
LIMIT 3;
id name email
7Azure Interiorazure@ex.com
9Deco Addictdeco@ex.com
14Gemini Furn.gemini@ex.com

CSV / XLSX

Overview Features How It Works Screenshots Who It's For FAQ Support Contact

What is PSQL Query Execute?

PSQL Query Execute is a technical module for Odoo that lets the users you choose run PostgreSQL queries directly from the Odoo user interface. Queries run read-only by default: inside a savepoint where PostgreSQL itself refuses any change, with a statement timeout and a row limit, and every execution is recorded in an audit log. Managers can run write statements after an explicit confirmation, with a dry run first.

Whether you need to quickly inspect data, validate records, debug issues, or generate ad-hoc reports, this module gives technical users raw database results inside Odoo, without handing out database credentials. Note that SQL bypasses Odoo's record rules: grant the PSQL Query groups deliberately.

Read-only by Default Paginated Results CSV & XLSX Export Access Groups Audit Log & History Confirmed Write Mode Bound Parameters Save & Reuse Queries
PSQL Query Execute banner - Run PostgreSQL queries from the Odoo interface
Core Capabilities

What Makes This Module Powerful

Three capabilities for database-level insight from inside Odoo, without giving up control.

Read-only, Enforced by PostgreSQL

SELECT, WITH, VALUES, TABLE, SHOW and EXPLAIN run in a savepoint with transaction_read_only on, then roll back. Hidden writes (WITH ... DELETE, SELECT INTO, nextval) are refused by the database.

Access Groups & Audit Log

Two groups (read-only user, write manager), not granted to every administrator. Every run, dry run, write, blocked attempt and export is logged with user, IP, SQL, outcome and duration.

Saved Queries & Export

Private or shared saved queries with :name parameters, paginated results, and CSV / XLSX export with spreadsheet-formula protection.

Full Feature Set

Everything Under the Hood

Every feature implemented and covered by automated tests on Odoo 19.

Menu Access & Navigation

Own PSQL Query app (Saved Queries, History & Audit Log), visible only to its groups. Settings administrators are not granted access automatically.

Saved & Shared Queries

Name, describe and save queries. Private by default; tick Shared to let other PSQL users read and run them. Managers see all queries.

Bound :name Parameters

Write :customer in the SQL, click Detect Parameters and fill values. Values are sent as bound parameters, never pasted into the SQL.

Confirmed Write Mode

Managers only: INSERT, UPDATE, DELETE and DDL run as a dry run (rolled back, affected rows shown) by default; committing requires typing EXECUTE. Server-level DDL (roles, databases, extensions, ALTER SYSTEM) is always refused.

Paginated, Safe Results

25 to 200 rows per page, sticky header, NULL shown distinctly, every value HTML-escaped. Rows are read through a server-side cursor up to the row limit.

CSV & XLSX Export

XLSX with typed cells, frozen header and autofilter; CSV in UTF-8. Text that looks like a spreadsheet formula is never turned into one. Exports are logged.

Guard Rails & Error Handling

Exactly one statement per run (anything after the first ; is refused, with strings, comments and dollar quotes understood), keyword allowlist, dangerous server functions blocked (file access, backend signalling, set_config, advisory locks, dblink), statement timeout and lock timeout. SQL errors, timeouts and blocked statements are shown on the query form and recorded in the audit log.

Quick Start

How It Works in 4 Simple Steps

From install to results in a minute. Timeout, row limit and log retention are configurable in Settings.

1

Navigate

Give users a PSQL Query group, then open the PSQL Query app

2

Write Query

Enter a name and your SQL, with :name parameters if needed

3

Execute

Click Execute (read-only); managers can use Execute as Write...

4

Export

Page through the result and click CSV or XLSX

Screenshots

See It in Action

Captured from this version on a test database.

Saved Queries list in the PSQL Query app

Saved Queries. Own app, visible only to the PSQL Query groups; owner, sharing and last run status at a glance

Paginated query result

Read-only execution. 120 rows, 25 per page, run with a bound :rows parameter; status and duration above the result

Query parameters tab

Parameters. :name placeholders detected from the SQL and sent as bound values

Blocked multi-statement query

Guard rails. A second statement after ';' is refused before reaching the database, and the attempt is logged

Execute as Write confirmation dialog

Confirmed write mode. Managers only; dry run by default, typing EXECUTE commits

Dry run result

Dry run. The statement ran, the affected row count is reported and every change was rolled back

History and audit log

History & Audit Log. Every read, dry run, write, blocked attempt and export, with user and duration

PSQL Query settings

Settings. Statement timeout, maximum rows and audit log retention

Built For

Who Is This Module For?

System Admins

Inspect tables, validate records, and debug data issues without leaving Odoo.

Developers

Test queries, verify data integrity, and run quick checks during development.

Consultants

Generate ad-hoc reports and investigate client data from the backend.

Odoo Partners

Give clients a controlled, audited tool for database inspection without database credentials.

Getting Started

Install the module: the installing administrator becomes a PSQL Query Manager; nobody else gets access automatically
Grant User (read-only SQL) or Manager (write SQL) in Settings > Users, then open the PSQL Query app
Create a saved query, give it a name and write your SQL
Click Execute (read-only) to run it and page through the result
Click CSV or XLSX to download the result; review activity in History & Audit Log
FAQ

Frequently Asked Questions

What type of queries can I run?

Users run SELECT, WITH, VALUES, TABLE, SHOW and EXPLAIN, read-only. Managers can also run INSERT, UPDATE, DELETE, MERGE and DDL after confirmation (dry run first). Transaction control, SET, COPY, DO, GRANT and server-level DDL are always refused.

Who can use it?

Only members of the PSQL Query groups. Settings administrators are not added automatically, because SQL bypasses Odoo's record rules and can read any data. Timeout, row limit and log retention are in General Settings.

Can I export results to Excel?

Yes. Export the last result as XLSX (typed cells, frozen header, autofilter) or CSV. Exports are recorded in the audit log.

What if my query has an error?

The PostgreSQL error message is shown in a red banner on the query form and recorded in the audit log; the database is left untouched.

Can I save and reuse queries?

Yes. Queries are saved records, private or shared, with parameters. The History lists every past execution and can open any of them in a new query.

Which Odoo version is supported?

Odoo 19, tested on Community with PostgreSQL 18 by an automated test suite. Enterprise and Odoo.sh are expected to work but have not been verified.

Support & Updates

Free & Fully Supported

Open-source under LGPL-3, with ongoing bug fixes, version updates, and responsive support.

Promise 01

Free Bug Fixes

Any bugs found will be fixed free of charge for the lifetime of your installation.

Promise 02

Version Updates

Receive future updates and compatibility patches as new Odoo versions are released.

Promise 03

Dedicated Support

Reach our technical team via Email, Phone, or WhatsApp for any questions.

Need Help? We're Here.

Have a question, found an issue, or want to share feedback? We respond fast via Email, Phone, or WhatsApp.

Contact Us → sales@sdlccorp.com

Phone

+1 415-594-0097

WhatsApp

+91 89209 44210

Email

sales@sdlccorp.com
Built by SDLC Corp sdlccorp.com Version 19.0.1.0.0
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 1257
Technical Name sdlc_psql_query_execute
LicenseLGPL-3
Websitehttps://sdlccorp.com

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
  • Ratings
  • Discuss
by
gavinguo
on 5/11/26, 3:46 AM



There are no comments yet!
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with