User: Password:
Subscribe / Log in / New account

Mutating with SELECT

Mutating with SELECT

Posted Sep 28, 2010 1:06 UTC (Tue) by ringerc (subscriber, #3071)
In reply to: HStore syntax by epa
Parent article: PostgreSQL 9.0 arrives with many new features

While that specific example was an error in the article, yes, it is possible to mutate data with SELECT. SELECT may invoke stored functions - written in C, SQL, PL/PgSQL, PL/Perl, etc - that mutate data. SQL and PL/PgSQL functions invoked from SELECT may use any SQL, including INSERT/UPDATE/DELETE but also DDL. Other languages may use the SPI to affect the database's state and contents.

(Log in to post comments)

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds