[SQL] Re: how to use record type
On Saturday 18 August 2001 00:18, you wrote: > I have encountered this problem (in a different context), and could not > find a way to insert entire rows/records in the way that you appear to > want. But it worked fine if I INSERTed explicitly, like: > INSERT INTO table VALUES (OLD.field1, OLD.field2, ..., OLD.fieldn); > That should work fine inside a plpgsql function. This is what I have been doing until recently. Rather ugly, as it is >250 different tables which need this. Meaning that I had to manually write the trigger functions for each table, attribute by attribute. At present, I solved the situation like that: - all tables that need the trigger function inherit a parent table - a python script scans all tables inheriting the parent table and then generates the trigger functions for them. I still execute the script manually after updating or inserting tables. - now I am trying to find out how to implement a trigger on the system tables that will fire my Python script automatically whenever a table inheriting this special parent table is altered or created. Sad that such an ugly hack is neccessary though. Horst ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[SQL] Array in plpgsql
hi all, Can some body show me how to declare a variable of type "array" in a function using plpgsql ? TIA Omid Omoomi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] Array in plpgsql
On Mon, 20 Aug 2001 08:41, omid omoomi wrote: > hi all, > Can some body show me how to declare a variable of type "array" in a > function using plpgsql ? http://www.postgresql.org/idocs/index.php?non-atomic-values.html#AEN1244 -- Sincerely etc., NAME Christopher Sawtell CELL PHONE 021 257 4451 ICQ UIN45863470 EMAIL csawtell @ paradise . net . nz CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz -> Please refrain from using HTML or WORD attachments in e-mails to me <- ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
[SQL] Altering pg_conndefaults
how do i change the User in pg_conndefaults because the user is not valid to connect to DB. one thing i can do is to add the User but is there a way to change the user seen in pg_conndeafaults... thanks in advance -- The information contained in this message (including any attachments) is confidential and intended solely for the attention and use of the named addressee(s). It must not be copied, distributed nor disclosed to any person. If you are not the intended recipient, please delete it from your system and notify sender immediately. Any disclosure, copying or distribution thereof or any action taken or omitted to be taken in reliance thereon is prohibited and may be unlawful. -- ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster