<span style="font-family: Verdana"> <div><font class="Apple-style-span" face="Arial">Hi Stef,<br />the underscore has to be escaped:<br /></font><span style="font-family: Verdana"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><br />SELECT * FROM pg_tables WHERE schemaname='public' AND tablename LIKE 'in\\_%' ORDER BY tablename ASC</span></font></span><br /><span style="font-family: Verdana"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"></span></font></span><br /><font class="Apple-style-span" face="Arial"><br />Excerpt from Manual:<br /><br />To match a literal underscore or percent sign without matching other characters, the respective character<br />in pattern must be preceded by the escape character. The default
escape character is the backslash<br />but a different one can be selected by using the ESCAPE clause. To match the escape character<br />itself, write two escape characters.<br />Note that the backslash already has a special meaning in string literals, so to write a pattern constant<br />that contains a backslash you must write two backslashes in an SQL statement (assuming escape string<br />syntax is used, see Section 4.1.2.1). Thus, writing a pattern that actually matches a literal backslash<br />means writing four backslashes in the statement. You can avoid this by selecting a different escape<br />character with ESCAPE; then a backslash is not special to LIKE anymore. (But it is still special to the<br />string literal parser, so you still need two of them.)<br /><br /></font><span
style="font-family: Verdana"><font class="Apple-style-span" face="Arial"><br /> Alternative use of a regular expression:<br /> <br /> </font><span style="font-family: Verdana"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span">SELECT * FROM pg_tables WHERE schemaname='public' AND tablename *~ 'in_' ORDER BY tablename ASC</span></font></span></span><br /><font class="Apple-style-span" face="Arial"><br />bye...<br />Ludwig<br type="_moz" /></font></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><br /></span></font></div> <div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><br /></span></font></div> <div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><br
/></span></font></div> <div><font class="Apple-style-span" face="Arial"><br /></font></div> <div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span"><br /></span></font></div> </span>