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

execute dynamic strings

From: Stefan(dot)Ardeleanu(at)siveco(dot)ro
To: pgsql-novice(at)postgresql(dot)org
Subject: execute dynamic strings
Date: 2005-02-22 14:15:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have a function with 3 parameters (select clause, where clause and order
by clause (last two are optionally clauses). This clauses apply to a given
table. For example, the table table1
and the function table1_rwc (read by where clause).
Given, let's say, the followings values select_clause = '*', where clause
'id = 1' and the order_by clause = 'id', it will be generate the result set
of the following query:

select * from Table1 where id = 1 order by id

I know I must use execute and prepare syntax, but I don't know how to create
the function.
Can you help me, please.


pgsql-novice by date

Next:From: Bruno Wolff IIIDate: 2005-02-22 14:37:24
Subject: Re: Perl DBI connection to Postgres
Previous:From: SG EdwardsDate: 2005-02-22 13:39:47
Subject: Perl DBI connection to Postgres

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