[SQL] diff databases

2004-12-18 Thread drdani
Hi, I'm looking for a tool which can compare structure of two databases and produce sql commands (ALTER, DROP, CREATE, etc. if needed) which could be used then to convert structure of one database to the other. I would like to use such a tool for postgresql databases especially. Daniel -

[SQL] plpsql function problem

2005-01-05 Thread drdani
Hi, I'm writing a plpgsql function. There is an insert in it (let's say to table1). This insert causes to call a trigger function which inserts some info to an other table (let's say table2): function . insert into table1 ... --> trigger function (runs after insert)

[SQL] vararg plpsql function

2005-01-05 Thread drdani
Hi, Is it possible to create vararg (like in C) functions in language plpgsql somehow? Daniel ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTE

[SQL] copy rows

2005-02-09 Thread drdani
Hi, What is the simplest solution in plpgsql to copy some rows in a table? I would like to do something like: select some rows do for each row skip serial field \ modify one field |-- what is the simplest way for this? insert as new row / Is it possible to insert a record t

[SQL] force command execution

2005-04-15 Thread drdani
Hi, Let's suppose I have a plpgsql function like: ... begin alter ... ...; insert ... ...; create ... ...; drop ...; and lot of such commands in any order... end; ... (There is no "perform" keyword.) Sometimes "ALTER" failes beco