Prepared statements and unknown types - Mailing list pgsql-general

From Thom Brown
Subject Prepared statements and unknown types
Date
Msg-id AANLkTikt0grVcBCEHumGnc+RoP6OuyNdbN7r7xst92_Y@mail.gmail.com
Whole thread Raw
Responses Re: Prepared statements and unknown types  (Peter Bex <Peter.Bex@xs4all.nl>)
Re: Prepared statements and unknown types  ("Igor Neyman" <ineyman@perceptron.com>)
List pgsql-general
Could someone explain why the following doesn't work?

test=# PREPARE meow(unknown) AS
test-# SELECT $1 as meow;
ERROR:  could not determine data type of parameter $1

The problem is that using PDO in PHP, prepared statements aren't
possible if values are used instead of columns in the select list.

This appears to be allowed for MySQL and SQL Server.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Basic question on PGSQL and Transactions
Next
From: Christian Ramseyer
Date:
Subject: Re: FTS GIN Index Question