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

Re: how to extract and use a string like a constraint?

From: Tim Landscheidt <tim(at)tim-landscheidt(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to extract and use a string like a constraint?
Date: 2010-07-07 20:31:50
Message-ID: m3wrt7ghjd.fsf@passepartout.tim-landscheidt.de (view raw or flat)
Thread:
Lists: pgsql-novice
"Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com> wrote:

> [...]
> and I also don't understand why this don't work:
> SELECT char_length(SELECT chk FROM tstchk WHERE id=1);
> Can it only be use with a temp var into a proc?

You have to use parentheses around the "SELECT" query,
i. e.:

| SELECT char_length((SELECT chk FROM tstchk WHERE id=1));

Tim


In response to

Responses

pgsql-novice by date

Next:From: Thom BrownDate: 2010-07-07 20:34:38
Subject: Re: how to extract and use a string like a constraint?
Previous:From: Jean-Yves F. BarbierDate: 2010-07-07 20:13:16
Subject: how to extract and use a string like a constraint?

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