# Editing SQL

DevFeed: [Editing SQL](<https://devfeed.tech/articles/editing-sql-34481.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2012/11/editing-sql/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2012-11-06T08:55:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [console](<https://devfeed.tech/tags/console.md>), [editor](<https://devfeed.tech/tags/editor.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [setup](<https://devfeed.tech/tags/setup.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This tutorial presents an Emacs workflow for editing PostgreSQL SQL queries. It describes pgdevenv-el and pgdev-sql-mode features for navigating and selecting queries, then sending the selected query to an associated psql buffer for execution.

## Source excerpt

It's hard to read my blog yet not know I'm using Emacs. It really is a great tool and has a lot to compare to PostgreSQL in terms of extensibility, documentation quality and community. And there's even a native implementation of the PostgreSQL Protocol written in Emacs Lisp. One of the things where Emacs really shines is that interactive development environment you get when working on some Emacs Lisp code. Evaluating an function as easy as a single key chord, and that will both compile in the function and load it in the running process. I can't tell you how many times I've been missing that ability when editing C code.