php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32977 Alternative pg_query_params returning query
Submitted: 2005-05-08 11:46 UTC Modified: 2012-03-31 05:28 UTC
From: direvus at gmail dot com Assigned:
Status: Wont fix Package: PostgreSQL related
PHP Version: 5.0.4 OS: Debian Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: direvus at gmail dot com
New email:
PHP Version: OS:

 

 [2005-05-08 11:46 UTC] direvus at gmail dot com
Description:
------------
pg_query_params is a neat function, and I think it would be useful to have a separate function which resolves the statement (makes all the parameter substitutions) and then returns the completed SQL statement string, rather than immediately executing it and returning the result set.

You could, for example, have pg_resolve_params return the query string, and then have pg_query_params which essentially returns pg_query( pg_resolve_params( [...args...] ) );

Thoughts?

BJ


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 23:15 UTC] jani@php.net
-Package: Feature/Change Request +Package: PostgreSQL related
 [2012-03-31 05:28 UTC] yohgaki@php.net
-Status: Open +Status: Wont fix
 [2012-03-31 05:28 UTC] yohgaki@php.net
pg_query_params() relies on real prepared query feature in PostgreSQL.

Use new pg_escape_literal()/pg_escape_identifier() for escaping strings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC