Re: how to extract and use a string like a constraint? - Mailing list pgsql-novice

From Tim Landscheidt
Subject Re: how to extract and use a string like a constraint?
Date
Msg-id m3wrt7ghjd.fsf@passepartout.tim-landscheidt.de
Whole thread Raw
In response to how to extract and use a string like a constraint?  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Responses Re: how to extract and use a string like a constraint?
List pgsql-novice
"Jean-Yves F. Barbier" <12ukwn@gmail.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

pgsql-novice by date:

Previous
From: "Jean-Yves F. Barbier"
Date:
Subject: how to extract and use a string like a constraint?
Next
From: Thom Brown
Date:
Subject: Re: how to extract and use a string like a constraint?