From: | "Mikael Carneholm" <Mikael(dot)Carneholm(at)WirelessCar(dot)com> |
---|---|
To: | "Michael Fuhr" <mike(at)fuhr(dot)org> |
Cc: | "'Pgsql-General (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Hanging creating of function |
Date: | 2005-11-09 19:19:32 |
Message-ID: | 7F10D26ECFA1FB458B89C5B4B0D72C2B088205@sesrv12.wirelesscar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Postgres machine OS: RHEL release 2.1 (Panama)
PGAdminIII client OS: WinXP Pro 2002 SP2
Clients: psql, PGAdminIII Query tool
dfol=> select version();
version
-------------------------------------------------------------
PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC 2.96
The original versions looked like this (same behaviour though):
create or replace function dfol.getcolstring (tblname varchar) returns varchar as $$
declare
table_columns text;
column_name record;
begin
-- skapa kolumnnamns-strängarna
for column_name in select pga.attname from pg_attribute pga, pg_class pgc
where pga.attrelid = pgc.relfilenode and pgc.relname = tblname and pga.attnum > 0 loop
table_columns := table_columns || column_name.attname || ',';
end loop;
-- kapa av sista kommatecknet
table_columns := substring(table_columns from 1 for length(table_columns)-1);
return table_columns;
end;
$$
language plpgsql;
create or replace function dfol.getcolstring (tblname text) returns varchar as $$
declare
table_columns text;
column_name record;
begin
-- skapa kolumnnamns-strängarna
for column_name in select pga.attname from pg_attribute pga, pg_class pgc
where pga.attrelid = pgc.relfilenode and pgc.relname = tblname and pga.attnum > 0 loop
table_columns := table_columns || column_name.attname || ',';
end loop;
-- kapa av sista kommatecknet
table_columns := substring(table_columns from 1 for length(table_columns)-1);
return table_columns;
end;
$$
language plpgsql;
-----Original Message-----
From: Michael Fuhr [mailto:mike(at)fuhr(dot)org]
Sent: den 9 november 2005 19:56
To: Mikael Carneholm
Cc: 'Pgsql-General (E-mail)
Subject: Re: [GENERAL] Hanging creating of function
On Wed, Nov 09, 2005 at 07:38:53PM +0100, Mikael Carneholm wrote:
> Can anyone explain why the first one never completes, but the second
> one does? (the first one just keeps running, I canceled after ~1 min)
>
> PG version: 8.1 final
Both functions create fine here in 8.1.0 on FreeBSD 6.0/i386 and
Solaris 9/sparc. What client are you using? If not psql, have
you tried with psql? What platform are you on?
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2005-11-09 19:20:03 | Re: libpq version in rpm packages |
Previous Message | Tom Lane | 2005-11-09 19:07:45 | Re: Foreign key reference causes invalid DELETE trigger calls |