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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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