Re: [GENERAL] nooby q: how get a row just inserted?

2009-05-30 Thread Scott Marlowe
On Sat, May 30, 2009 at 6:52 PM, Kenneth Tilton wrote: > > > Martin Gainty wrote: >> >> yes i would suggest using OID >> included in Postgres distro is a sample create table,index named >> fti.pl >> >> does this answer your question? > > oid would have been fine, but I am going with Rodrigo's sugg

Re: [GENERAL] nooby q: how get a row just inserted?

2009-05-30 Thread Kenneth Tilton
Martin Gainty wrote: yes i would suggest using OID included in Postgres distro is a sample create table,index named fti.pl does this answer your question? oid would have been fine, but I am going with Rodrigo's suggestion to simply use the returning option on insert which I somehow missed.

Re: [GENERAL] nooby q: how get a row just inserted?

2009-05-30 Thread Martin Gainty
yes i would suggest using OID included in Postgres distro is a sample create table,index named fti.pl does this answer your question? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vert

Re: [GENERAL] nooby q: how get a row just inserted?

2009-05-30 Thread Rodrigo Gonzalez
On 05/30/2009 07:02 PM, Kenneth Tilton wrote: I am probably breaking the rules here which is why I have a problem, but here goes: I am trying to build an audit trail skeleton of all my table inserts. Everything table has a column for the serial ID of an audit trail table row I will create for eac

[GENERAL] nooby q: how get a row just inserted?

2009-05-30 Thread Kenneth Tilton
I am probably breaking the rules here which is why I have a problem, but here goes: I am trying to build an audit trail skeleton of all my table inserts. Everything table has a column for the serial ID of an audit trail table row I will create for each transaction or batch of transactions if I

Re: [GENERAL] How can I look at a recursive table dependency tree?

2009-05-30 Thread Tom Lane
Greg Stark writes: > On Fri, May 29, 2009 at 5:10 PM, Emi Lu wrote: >> Is it possible to find all view names depend on one table? > With 8.4 you can use a query like this (change 'messages' to your table name) In earlier versions the usual trick is BEGIN; DROP VIEW whatever RES

Re: [GENERAL] Modifying ENUM Type

2009-05-30 Thread Merlin Moncure
On Sat, May 30, 2009 at 3:55 AM, APseudoUtopia wrote: > Hey, > > I created an ENUM type. However, I accidentally typoed in one of the > enum values. It is "apps" and it should be "app". What's the best way > to modify this without dropping the type? I have many tables which > have columns that dep

Re: [GENERAL] How can I look at a recursive table dependency tree?

2009-05-30 Thread Greg Stark
On Fri, May 29, 2009 at 5:10 PM, Emi Lu wrote: > Is it possible to find all view names depend on one table? With 8.4 you can use a query like this (change 'messages' to your table name) This query could stand to be polished a bit though... WITH RECURSIVE tree AS ( SELECT 'messages'::regclass:

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-30 Thread Stefan Kaltenbrunner
Scott Bailey wrote: John R Pierce wrote: Scott Bailey wrote: Well at work we've got Oracle, MySQL, MS SQL and Postgres. So I generally use Aqua Data Studio because it works with all of them. For MySQL and MS SQL you register a single connection to the server and can switch to any database. Bu

[GENERAL] Modifying ENUM Type

2009-05-30 Thread APseudoUtopia
Hey, I created an ENUM type. However, I accidentally typoed in one of the enum values. It is "apps" and it should be "app". What's the best way to modify this without dropping the type? I have many tables which have columns that depend on the type, and I'm trying to avoid having to recreate all th

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-30 Thread Scott Bailey
John R Pierce wrote: Scott Bailey wrote: Well at work we've got Oracle, MySQL, MS SQL and Postgres. So I generally use Aqua Data Studio because it works with all of them. For MySQL and MS SQL you register a single connection to the server and can switch to any database. But with Postgres, you