ERROR: Invalid regular expression: parentheses ( ) not balanced

ERROR: Invalid regular expression: parentheses ( ) not balanced

am 22.08.2004 21:51:34 von Kathrine S

Below is a copy of my sql sentence including the error I am getting. What
does the error mean? What have I done wrong?

kathrirs=# insert into faglaerer
kathrirs-# values ('f-001', '13056802876', 'Petter Lær',
lo_import('/home/studenter/it03/kathrirs/img/img01.jpg'),
kathrirs(# '2001-12-25', 100, 'Professor', 'A', 1,
'{"linux","programmering","matematikk","neutrale nettverk"}',
kathrirs(# 12, 'petter.laer@dih.no', '8212');
ERROR: Invalid regular expression: parentheses ( ) not balanced

Re: ERROR: Invalid regular expression: parentheses ( ) not balanced

am 26.08.2004 04:21:30 von tgl

"Kathrine S" writes:
> Below is a copy of my sql sentence including the error I am getting. What
> does the error mean? What have I done wrong?

> kathrirs=# insert into faglaerer
> kathrirs-# values ('f-001', '13056802876', 'Petter Lær',
> lo_import('/home/studenter/it03/kathrirs/img/img01.jpg'),
> kathrirs(# '2001-12-25', 100, 'Professor', 'A', 1,
> '{"linux","programmering","matematikk","neutrale nettverk"}',
> kathrirs(# 12, 'petter.laer@dih.no', '8212');
> ERROR: Invalid regular expression: parentheses ( ) not balanced

There's no regular expression in what you've shown us. Maybe you have
rules or triggers that are fired by this INSERT? If so, you need to
look at what they are doing.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Re: ERROR: Invalid regular expression: parentheses ( ) not balanced

am 26.08.2004 04:44:52 von aklaver

On Wednesday 25 August 2004 07:21 pm, Tom Lane wrote:
> "Kathrine S" writes:
> > Below is a copy of my sql sentence including the error I am getting. Wh=
at
> > does the error mean? What have I done wrong?
> >
> > kathrirs=3D# insert into faglaerer
> > kathrirs-# values ('f-001', '13056802876', 'Petter L=E6r',
> > lo_import('/home/studenter/it03/kathrirs/img/img01.jpg'),<----1
> > kathrirs(# '2001-12-25', 100, 'Professor', 'A', 1,<------2
> > '{"linux","programmering","matematikk","neutrale nettverk"}',
> > kathrirs(# 12, 'petter.laer@dih.no', '8212');
> > ERROR: Invalid regular expression: parentheses ( ) not balanced
>
> There's no regular expression in what you've shown us. Maybe you have
> rules or triggers that are fired by this INSERT? If so, you need to
> look at what they are doing.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

I don't know what to make of it but the problem seems to start at the lines=
I=20
have marked 1 & 2 and involves the lo_import function. I have not used=20
lo_import and so do not know how to call it. What I do see is that it is=
=20
called at 1 and a '(' shows up to the left of the prompt at 2 and stays=
=20
there indicating to me at least the parser is not happy.
--=20
Adrian Klaver=09
aklaver@comcast.net

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Re: ERROR: Invalid regular expression: parentheses ( ) not balanced

am 26.08.2004 04:54:28 von tgl

Adrian Klaver writes:
> I don't know what to make of it but the problem seems to start at the lines I
> have marked 1 & 2 and involves the lo_import function. I have not used
> lo_import and so do not know how to call it. What I do see is that it is
> called at 1 and a '(' shows up to the left of the prompt at 2 and stays
> there indicating to me at least the parser is not happy.

No, that's just because psql has noticed that the left paren following
VALUES is unmatched. I suppose that what Kathrine is showing us is
line-wrapped text and that the lo_import function call was actually
typed on the same line as "values(...", since there's not another psql
prompt visible there.

But in any case, the given error message could only have come from a
regex match operator (~ or ~*) that does not like the pattern operand it
was given. Since there's no ~ operator in the given query, I have to
suppose that the problem is in something that's being invoked behind-the-
scenes, like a trigger or rule.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match