pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: Dynamic sql
Date: 10 Sep 2011 09:18:41 GMT
Message-ID: <j4fa1h$38a$1@reversiblemaps.ath.cx> (raw)
References: <CALy5J6XS-Z5jtFCJtW7qxfdch1EqvXMaGTxaTUf=E8kk8mOYhw@mail.gmail.com>

On 2011-09-10, Gabriel Filipiak <gabriel.filipiak@gmail.com> wrote:
> --bcaec517adbceea3c804ac90a376
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi, this is my first on this list.
>
> I want to know the basics of dynamic sql especially in PostgreSQL. I was
> googling for a while but have no luck for getting a good described examples.
> Maybe someone here could give me some links to the materials from which you
> where studying this subject.

Usually I go to the manual first.

http://www.postgresql.org/docs/9.0/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-...

some things to consider: use quote_identifier and quote_literal when
passing names and values into the sql statements: you can't pass
variables in, only their values.

-- 
⚂⚃ 100% natural




view thread (5+ messages)

Message-ID: <j4fa1h$38a$1@reversiblemaps.ath.cx>
Permalink:  ../j4fa1h$38a$1@reversiblemaps.ath.cx/
Also on:    postgresql.org/message-id/j4fa1h$38a$1@reversiblemaps.ath.cx

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasen@xnet.co.nz
  Subject: Re: Dynamic sql
  In-Reply-To: <j4fa1h$38a$1@reversiblemaps.ath.cx>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox