"Oleg Serov" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION "bug_with_triggers" () RETURNS trigger AS
> $body$
> BEGIN
> PERFORM COALESCE(NEW.some_composite_field.field, TRUE);
> END;
> $body$
> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
> Error:
> ERROR: N
Hello
you have to use parenthesis, because parser don't distinguish between
variants schema.table.column and variable.field.attrib
example:
postgres=# create or replace function trgbody() returns trigger as $$
begin
raise notice '%', (new.a).a;
return new;
end $$ language plpgsql;
CREATE FUN
SQL:
CREATE OR REPLACE FUNCTION "bug_with_triggers" () RETURNS trigger AS
$body$
BEGIN
PERFORM COALESCE(NEW.some_composite_field.field, TRUE);
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
Error:
ERROR: NEW used in query that is not in a rule
QUERY: SEL
Bruce Momjian <[EMAIL PROTECTED]> writes:
> My question is whether you think "--" _inside_ quotes should be a
> comment. I don't think it should be.
It should be if plpgsql thinks it is. But that's not the problem here.
Doubling the quote marks would help...
regards, tom
Hello world,
I am using "PostgreSQL 7.1.2 on i386-unknown-freebsd4.2, compiled by GCC
2.95.2" (according to version()). I suspect that there is a parser bug in
the handling of '--' comments:
radius=# create function test() returns integer as '
radius'# begin
radius'# -- comment without quote
Hi!
> "Alexander Zagrebin" <[EMAIL PROTECTED]> writes:
> > But if "rec" is declared as "hierarchy%ROWTYPE", then
> > execution fails with such log messages:
>
> I can't duplicate this in current sources. Please try 7.1.2.
>
> regards, tom lane
Thanks! At 7.1.2 that proc
"Alexander Zagrebin" <[EMAIL PROTECTED]> writes:
> But if "rec" is declared as "hierarchy%ROWTYPE", then
> execution fails with such log messages:
I can't duplicate this in current sources. Please try 7.1.2.
regards, tom lane
---(end of broadcast
Hi!
I try to work with trees in Postgres 7.1.1
My test script is
CREATE TABLE hierarchy
parent INTEGER,
child INTEGER
);
INSERT INTO hierarchy VALUES (1, 2);
INSERT INTO hierarchy VALUES (2, 4);
INSERT INTO
Hi,
i think i found a bug in the pgsql interpreter. Platform is
Linux-2.4.0 on Intel, Postgres-Version is 7.1.1 .
The Problem:
I want to use a table name in a select statement within a function,
where the table name comes in as argument. It only works, if at all,
inside an execute statement. Wh
Your name : Andriy I Pilipenko
Your email address : [EMAIL PROTECTED]
System Configuration
-
Architecture (example: Intel Pentium) : Intel Pentium
Operating System (example: Linux 2.0.26 ELF) : FreeBSD-4.2-STABLE
PostgreSQL ve
10 matches
Mail list logo