On 30 September 2010 14:36, Igor Neyman wrote:
>> -Original Message-
>> From: Thom Brown [mailto:t...@linux.com]
>> Sent: Wednesday, September 29, 2010 2:08 PM
>> To: PGSQL Mailing List
>> Subject: Prepared statements and unknown types
>>
>> Could someone explain why the following doesn't
> -Original Message-
> From: Thom Brown [mailto:t...@linux.com]
> Sent: Wednesday, September 29, 2010 2:08 PM
> To: PGSQL Mailing List
> Subject: Prepared statements and unknown types
>
> Could someone explain why the following doesn't work?
>
> test=# PREPARE meow(unknown) AS
> test-
On 29 September 2010 20:02, Tom Lane wrote:
> Peter Bex writes:
>> On Wed, Sep 29, 2010 at 07:33:53PM +0100, Thom Brown wrote:
>>> Okay, I understand what's happening. But does the planner need to
>>> understand the type of literals in the select list if it's not used
>>> anywhere else?
>
>> Fie
Peter Bex writes:
> On Wed, Sep 29, 2010 at 07:33:53PM +0100, Thom Brown wrote:
>> Okay, I understand what's happening. But does the planner need to
>> understand the type of literals in the select list if it's not used
>> anywhere else?
> Fields sent back to the client also carry their type wit
On 29 September 2010 19:41, Peter Bex wrote:
> On Wed, Sep 29, 2010 at 07:33:53PM +0100, Thom Brown wrote:
>> Okay, I understand what's happening. But does the planner need to
>> understand the type of literals in the select list if it's not used
>> anywhere else?
>
> Fields sent back to the clie
On Wed, Sep 29, 2010 at 07:33:53PM +0100, Thom Brown wrote:
> Okay, I understand what's happening. But does the planner need to
> understand the type of literals in the select list if it's not used
> anywhere else?
Fields sent back to the client also carry their type with them.
There's no "unknow
On 29 September 2010 19:15, Peter Bex wrote:
> On Wed, Sep 29, 2010 at 07:08:22PM +0100, Thom Brown wrote:
>> 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
On Wed, Sep 29, 2010 at 07:08:22PM +0100, Thom Brown wrote:
> 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
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.