Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-22 Thread Artis Caune
Glyn Astill wrote: > FATAL: the database system is starting up > FATAL: the database system is starting up > FATAL: the database system is starting up > > > As far as I know theres nothing else trying to connect. I think you are using FreeBSD, and default pg_ctl flags in rc.d contains "-w" o

[GENERAL] plpgsql functions or queries

2008-07-23 Thread Artis Caune
Is it safe to use plpgsql functions with 'security definer'? For example we have table for spamassassin preferences, and user spamassassin. I don't want spamassassin user to see user database (passwords, ...) So I use function: CREATE OR REPLACE FUNCTION get_sa_preferences( VARCHAR ) RETURNS SET

Re: [GENERAL] Server installation problem using freebsd ports

2008-09-09 Thread Artis Caune
should go to freebsd-questions@ -- regards, Artis Caune <. CCNA <| <' didii FreeBSD -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] plpgsql return select from multiple tables

2008-09-10 Thread Artis Caune
lot of those queries? -- regards, Artis Caune <. CCNA <| <' didii FreeBSD -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] plpgsql return select from multiple tables

2008-09-10 Thread Artis Caune
is function is not so simple and use some plpgsql features. Here is one of them: http://dpaste.com/hold/77192/ -- regards, Artis Caune <. CCNA <| <' didii FreeBSD -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] plpgsql return select from multiple tables

2008-09-11 Thread Artis Caune
ies would be a bit simpler: > > SELECT * FROM get_user_data('${id}'); Yes, it should return only one row. I can not use "return query" without SETOF. Or should I create my_type, select into my_type_variable and return my_type_variable? -- regards, Artis Caun

Re: [GENERAL] plpgsql return select from multiple tables

2008-09-11 Thread Artis Caune
elects with "AS (email VARCHAR, backend VARCHAR)" are confusing me. -- regards, Artis Caune <. CCNA <| <' didii FreeBSD -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] plpgsql and arrays

2007-01-12 Thread Artis Caune
I'm trying to write function which accept array and insert each element in table: =# SELECT * FROM add_user('[EMAIL PROTECTED], [EMAIL PROTECTED]'); ERROR: column "email" is of type character varying but expression is of type record HINT: You will need to rewrite or cast th

Re: [GENERAL] plpgsql and arrays

2007-01-12 Thread Artis Caune
END IF; END LOOP; RETURN v_uid; END; $$ LANGUAGE 'plpgsql'; Richard Huxton wrote: Artis Caune wrote: I'm trying to write function which accept array and insert each element in table: =# SELECT * FROM add_user('[EMAIL PROTECTED], [EMAIL PROTECTED]'); ERROR: