Skip site navigation (1) Skip section navigation (2)

Re: Functions with dynamic queries

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: Gabriel Dovalo Carril <dovalo(at)terra(dot)es>
Cc: Lista SQL de postgres <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Functions with dynamic queries
Date: 2002-05-24 11:53:17
Message-ID: 200205241723.17095.mallah@trade-india.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hi Gabriel,

I am not very adept in using PLPGSQL.

Once I had  tried to create a query dynamically and execute it
but did not work out (but i do not exactly remeber the problem).
but what i feel is  using "EXECUTE" would be a overkill.

I think Jeff has almost solved your problem and with your little
coperation the problem can be sorted out.

If you  still really need the solution desperately
i would apprecite if you could prepare an .sql file
which creates , the table and inserts some data relevent
to the SQL query into it , attach it and post to the list.

Regds
Mallah.

> And I need to know how can a query be executed substituting
> variables.
>


On Friday 24 May 2002 01:54 pm, Gabriel Dovalo Carril wrote:
> "Rajesh Kumar Mallah." escribió:
> > I guess the examples on standard docs explain it.
> > dont they?
>
> Hi Rajesh,
>
> 	I have read docs examples again, and even examples at:
>
> http://www.brasileiro.net/postgres/plpgsql/plpgsql-description.html
>
> section 1.2.5.3, which explains how to execute dynamic queries.
> At the end of this section there is an example with a comment:
>
> -- This works because we are not substituting any variables
> -- Otherwise is would fail.
>
> 	And I need to know how can a query be executed substituting
> variables.
>
> Thanks,

-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



In response to

pgsql-sql by date

Next:From: Jeff EckermannDate: 2002-05-24 13:51:06
Subject: Re: Functions with dynamic queries
Previous:From: Gabriel Dovalo CarrilDate: 2002-05-24 08:24:10
Subject: Re: Functions with dynamic queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group