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

Re: checking select query syntax and semantics via php without executing

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Marco Dieckhoff <dieck(at)gmx(dot)de>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: checking select query syntax and semantics via php without executing
Date: 2009-10-05 21:50:51
Message-ID: 4ACA6A3B.50005@iol.ie (view raw or flat)
Thread:
Lists: pgsql-php
On 05/10/2009 22:34, Marco Dieckhoff wrote:

> Is it possible in PHP to give a sql (select) query to Postgres via pg_*
> so that it is NOT executed but merely checked for syntax including
> correct, existing field and table names, and data types?

How about prepending "explain" to the query? Just a wild notion.

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

pgsql-php by date

Next:From: Bill MoranDate: 2009-10-05 22:01:39
Subject: Re: checking select query syntax and semantics via php without executing
Previous:From: Marco DieckhoffDate: 2009-10-05 21:34:32
Subject: checking select query syntax and semantics via php without executing

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