Re: [SQL] case stement when null

2004-06-18 Thread Riccardo G. Facchini
--- Jaime Casanova <__> wrote: > hi all, > > Well i rethink my design 'cause the other was too slow. but all > solutions > involves new problems... now my problem is with a function of this > type: > > > CREATE OR REPLACE FUNCTION > "public"."rec_f_consultarplanificacionrubros" > (smallint, sm

Re: [SQL] plpgsql - Insert from a record variable?

2004-06-18 Thread Riccardo G. Facchini
--- Phil Endecott <__> wrote: > Dear Postgresql experts, > > I'm writing a simple plpgsql function that selects a row from a > table, modifies it slightly, and inserts the modified version. This > sounds simple, but I can't find how to do the insert in a simple > generic fashion: although SELECT

[SQL] case stement when null

2004-06-18 Thread Jaime Casanova
hi all, Well i rethink my design 'cause the other was too slow. but all solutions involves new problems... now my problem is with a function of this type: CREATE OR REPLACE FUNCTION "public"."rec_f_consultarplanificacionrubros" (smallint, smallint, char(9), smallint, smallint, smallint, char(2))

[SQL] In 7.4 ensure you have DEFAULT now () with no spaces

2004-06-18 Thread David B
Just a heads up folks... In converting from 7.3 to 7.4 one got-ya we had was... We had been testing 7.4 for a few days and just noticed that some tables had created_timestamp rows with a date/time of the date the DB was created...not the date/time the insert was done. Looking at those tables the

Re: [SQL] [JDBC] Prepare Statement

2004-06-18 Thread Jie Liang
So, I think that PreparedStatement should have a way at least case a String to an Array or a way to create a Array, because of conn.prepareStatement("SELECT myfunction('{1,2,3}')") is NOT very useful. Comment? Jie Liang -Original Message- From: Kris Jurka [mailto:[EMAIL PROTECTED] Sen

Re: [SQL] [JDBC] Prepare Statement

2004-06-18 Thread Jie Liang
Nope, I think you are right. The improvement of performance will be minimal. Because that to parse "SELECT * FROM myfunction(?,?,?)" is very very quick. However, I am still thinking if I call one SELECT and one DELECT and one UPDATE and one INSERT a thousand times against same table with different