For those who aren’t familiar with hstore, it’s a key/value storage type that is packaged as an extension or contrib in PostgreSQL 8.2+. In PostgreSQL 9.0 it got a little extra loving in several ways one of which was the introduction of the hstore(record) casting function that converts a record to an hstore. In this article, I’ll demonstrate how you can use this new casting function to do very sleek mail merges right in the database. The only caveat is that it seems to only correctly name the keys if it is fed a real table or view. Derived queries such as aggregates etc get keys named f1, f2, etc.
If you are on PostgreSQL 9.1 or above installing — hstore is just a CREATE EXTENSION hstore; sql command away. If you are on a lower version of PostgreSQL, you can usually find the hstore.sql in share/contribs.Mas:

http://www.postgresonline.com/journal/archives/238-Mail-Merging-using-Hstore.html

Post comment

*

Buscar en DbRunas

Descargar versiones libres recomendadas actualizadas

Revistas

PostgreSQL Magazine (ingles): PostgreSQL Magazine
SQL Server (ingles): SolidQ SQL Server Journal
SQL Server (ingles): Code Magazine
PostgreSQL (ingles): Postgres OnLine Journal
Oracle (ingles): oraclemagazine-digital
SQL Server (español): MSDN Magazine
MySQL (ingles): MySQL Magazine

Manuales

Recursos

Archivo diario de noticias

December 2011
M T W T F S S
« Nov   Jan »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archivo por mes y año

Comentarios recientes

RSS Ayudas Oracle

RSS Ayudas PostgreSQL

RSS Ayudas MySQL

RSS Ayudas SQL Server

RSS Ayudas DB2

RSS Ayudas SQL

RSS Feeds Planeta PostgreSQL-es

RSS Feeds Planet PostgreSQL

RSS Feeds Planeta PostgreSLQ Brazil

RSS Feeds Planet MySQL

Blogroll

Clouds

Desde donde nos visitan

Site5 | Experts In Reseller Hosting.