PostgreSQL online

 


This playground allows you to test postgres online (PostgreSQL 11.10).

You can directly use the editor above to run queries directly to a Postgresql database. You can run the following statements with postgresql-specific syntax: create table, create view, create index, explain, vacuum, select, update and delete.

It is not possible to use transactions (The connection is not persistent).

You can use the postgis extension for that click on "Database > Activate PostGis".

This tool does not allow storing persistent data (only a few minutes), it is just a PostgreSQL sandbox. It can help to make small tests easily, you can test Postgres queries online in a few seconds without installation. Your data will pass through the network, be careful not to use sensitive data.

Autocomplete: Ctrl-space for autocomplete.

Usage constraints:

/!\ The database that you create is deleted after approximately 30 minutes of inactivity.

/!\ The database is limited to 20MB, if you exceed this limit, your database will be deleted.

How to test Postgres queries online?

  • Enter your SQL query in the editor, finally click on "Run" to execute it. The query result will be displayed below the editor .

  • You can also run only one query entered in the editor. To do this, simply select it before clicking on "Run".

  • If you want to export the results in csv format, click on "Export".

Code editor

You can share SQL snippet. Click on "Share snippet" to share your SQL code.
Your database will not be backed up, this only saves the editor code! This is useful for sharing SQL code.

The sql queries entered in the editor are saved so that you will find them during your next visits.
Warning, this is a local backup in your browser, it can be deleted at any time.

How to dump Postgres database ?

You can dump Postgres database to SQL file. Click on "Database > Dump DB to SQL" to export your Postgres DB.


About PostgreSQL

PostgreSQL is a free and open source object-relational database system. PostgreSQL has a strong reputation for reliability and performance thanks to over 30 years of community development. It is available for macOS Server, Linux, FreeBSD, OpenBSD, and Windows.

PostgreSQL can be used as the primary data store or data warehouse for many websites, mobile applications ...



Export results to CSV

Separator
NULL string
Header
Save and Share SQL snippet
Save SQL code in order to share it.
Your database will not be backed up, this only saves the editor code! This is useful for sharing SQL code.
Be careful, the data will be accessible to everyone, please do not save sensitive data.
Save SQL snippet
Your SQL snippet has been permanently saved and you (or anybody) can access with this link:
Password
Choice a password to modify/delete this SQL snippet later Enter password to modify this SQL snippet. Enter password to delete this SQL snippet. Enter the new password for the fork.
You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments




Arnold Wilson-2021-01-20 18:46
Seeking to educate myself further in Postgres SQL
and user books or tutorials.
Seeking how Postgres fits in with Amaxon Aurora


Co-2021-02-25 17:37
This error keeps popping up suddenly when in the middle of working with a tiny postgresql db I created
password authentication failed for user ""

Then I cant get back into the db and have to start all over.
But sometimes that error appears again and again no matter how often I refresh the browser. Like for the last ten minutes.
And I cant get the sandbox to run again.
How can I avoid this?


Luc CHAUVIERE-2021-03-12 07:44
Thank you for this powerfull tool.

2 tips for your documentation :
Add the keyword EXPLAIN (it runs!)
It seams that the real current version of the DB is PG 11.10 (?)

Can you add the fonctionalities around VACUUM ?


Cyril (admin)-2021-03-12 13:48
Hello,

Thank you for your feedback!!
I had to change the version of postgres, and forgot to update the documentation. This is corrected!
You can already execute vacuum. Can you detail?



David Zachary Mason-2021-08-24 08:07
Thank you for this tool. Allowed me to work on a query that I have my trying to solve for a week!


Angel-2021-08-26 12:02
"Following an error, please reload the page", no matter what I try in the editor.


Anton-2021-10-27 09:49
Thank you! I've managed to create a query that helped me to make a fast report with the data I needed.


engineer-2021-11-12 10:32
Is this broken now?


Cyril (Admin)-2021-11-12 10:58
It is fixed!


Sylvain-2021-12-03 09:24
(un petit commentaire en Français, c'est bien aussi ;) )
Merci pour cet outil qui peut rendre bien des services quand on n'a pas de serveur PostGreSQL sous la main et qu'on veut vite tester une requête SQL.
Et un encore plus GRAND MERCI pour l'ajout de l'extension PostGis pour ouvrir la dimension Spatiale aux requêtes !


Lim-2021-12-10 11:14
is it broken now?


Cyril (Admin)-2021-12-10 14:11
yes, thank you for the comment, it is fixed!


adam-2022-02-02 16:45
'datetime' type is not supported


Cyril (admin)-2022-02-02 19:43
Hi! PostgreSQL doesn't have datetime data type, you can use timestamp (without time zone).


Cristian Sanchez-2022-03-20 19:48
Thanks for providing this amazing tool.

I,d be greate if you a load icon or something that let you know when a query is running


Toni Masó-2022-03-25 10:32
Could you activate crosstab extension? (tablefunc)


Twilight-2022-03-25 11:14
This compiler is very useful to me for testing the script. I will give you some suggestions to improve.
if the editor box is big, it would be beautiful. also, more spaces will be there to write the script.
Reduce website banner size you can get more spaces(Reduce unwanted spaces - increase editor box size).
Give proper message for a script running like table created, truncated, dropped,1 rows inserted - SQL Developer.
Give query format option.
Develop more features like having SQL Developer application.


Twilight-2022-03-25 11:16
This compiler is very useful to me for testing the script. I will give you some suggestions to improve.
if the editor box is big, it would be beautiful. also, more spaces will be there to write the script.
Reduce website banner size you can get more spaces(Reduce unwanted spaces - increase editor box size).
Give proper message for a script running like table created, truncated, dropped,1 rows inserted - SQL Developer.
Give query format option.
Develop more features like having SQL Developer application