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

Re: Migration from INFORMIX to POSTGRESQL

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Migration from INFORMIX to POSTGRESQL
Date: 2010-02-24 12:43:32
Message-ID: hm36t9$183$ (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Atif Jung, 24.02.2010 12:56:
> The problem I'm having is that on compilation I get the following error:
> ERROR: syntax error at or near "pattern".
> The pattern column in table name_link has entries like:
> " *I[0-Z] [0-Z] [0-Z] [0-9]* "
> Any help and advice would be greatly appreciated.
> Thank you.

IN will require a list of values supplied (e.g. IN (1,2,3) or IN ('one', 'two', 'three).

It has nothing to do with regular expression.

You want to either use the regexp_matches() function or the MATCHES operator:

So something like:

SELECT code, priority INTO :acCode, :acPriority
FROM name_link
WHERE regexp_matches(:acHostFormat, pattern)
ORDER BY priority;


In response to

pgsql-novice by date

Next:From: Alex HunsakerDate: 2010-02-24 23:46:32
Subject: Re: How to get the permissions assigned to user?
Previous:From: Atif JungDate: 2010-02-24 11:56:59
Subject: Migration from INFORMIX to POSTGRESQL

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