Search Postgresql Archives

Re: Constraint exclusion issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/16 Mathieu De Zutter <mathieu@xxxxxxxxxxxx>:
> On Sat, Jan 16, 2010 at 7:26 PM, Scott Marlowe <scott.marlowe@xxxxxxxxx> wrote:
>> On Sat, Jan 16, 2010 at 11:02 AM, Mathieu De Zutter
>> <mathieu@xxxxxxxxxxxx> wrote:
>>> shs-dev=# explain select * from parent where (c,n) = '("b",0)';
>>> ERROR:  input of anonymous composite types is not implemented
>>
>> Shouldn't that be 'b' not "b" ?
>
> It is special syntax to avoid escapes:
>
> shs-dev=# select '("b",0)'::y;
>   y
> -------
>  (b,0)
>

To avoid escapes use E'string'.

In that case the ' will be include into the string, so it will be not more
1 char lenght.

Or something like this:
select ('(' || quote_literal('b') || ',0)')::y

> shs-dev=# select ('("b,",0)'::y).c;
> ERROR:  value too long for type character(1)
> LINE 1: select ('("b,",0)'::y).c;
>
> --


-- 
              Emanuel Calvo Franco
             DBA at:  www.siu.edu.ar
        www.emanuelcalvofranco.com.ar
       Join: http://www.thevenusproject.com/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux