Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-26 Thread Gnanavel S
On 9/27/05, Jim C. Nasby [EMAIL PROTECTED] wrote: On Mon, Sep 26, 2005 at 08:41:03PM +0200, Yonatan Ben-Nes wrote: Anyway I saw the idea: BEGIN; CREATE new_table; SELECT INTO new_table * FROM temp_table; DROP TABLE table; Instead of dropping it here, just rename to a different name and then after

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Gnanavel S
'IF' block is not ended.On 9/15/05, Bjørn T Johansen [EMAIL PROTECTED] wrote: I am trying to write a function that returns x rows, where x = 0 and this is what Ihave come up with...:CREATE OR REPLACE FUNCTION trykkStatus (pressID SMALLINT) RETURNS REFCURSOR AS 'declareorderID ordrenew.id%TYPE;cur

Re: [GENERAL] Partial dates

2005-09-13 Thread Gnanavel S
On 9/14/05, Joe [EMAIL PROTECTED] wrote: Joshua D. Drake wrote: Well the easy solution is to just make the date a text type but that is the wrong answer. The right answer is to fix the data set. MySQL should never have allowed you do insert those dates in the first place. I know that doesn't help

Re: [GENERAL] Rules UPDATE

2005-08-22 Thread Gnanavel S
On 8/22/05, Pailloncy Jean-Gerard [EMAIL PROTECTED] wrote: Hi,With PostgreSQL 7.4.6.I have a table aaa (id serial, maj timestamp without time zone)I defined to function from_timestamp and to_timestamp to doconversion between text and timestamp with few checks and tricks. I defined a view aab (id

Re: [GENERAL] Strange delete behaviour

2005-08-01 Thread Gnanavel S
post the description of the t_node and t_document tables for more informationOn 8/1/05, Renzo Kottmann [EMAIL PROTECTED] wrote:Hello,I have a strange delete behaviour in my postgres 8.0.3 database: If I try adelete from t_node wherenode_doc_id = XX;from inside a plpgsql functionon this

Re: [GENERAL] Strange delete behaviour

2005-08-01 Thread Gnanavel S
Post the result of \d t_node t_documentOn 8/1/05, Renzo Kottmann [EMAIL PROTECTED] wrote: Gnanavel S wrote: post the description of the t_node and t_document tables for more information On 8/1/05, Renzo Kottmann [EMAIL PROTECTED] wrote: Hello,I have a strange delete behaviour in my postgres 8.0.3

Re: [GENERAL] problem inserting with sequence

2005-07-28 Thread Gnanavel S
On 7/28/05, germ germ [EMAIL PROTECTED] wrote: I have been trying to figure out why I can't insertinto a table and I think it has something to do withthe sequnce.I am able to use able to properly insert into thetable using the the shell, but I am not able to insert using a php script:INSERT INTO

Re: [GENERAL] INSERT INTO from a SELECT query

2005-07-13 Thread Gnanavel S
Here the media_id will be checked with ('24,25') and not with (24,25). You might change the datatype from varchar to int array in test function and use any in the place of IN clause like this, CREATE FUNCTION test(int[]) RETURNS int2 AS ' DECLARE id_list ALIAS FOR $1; BEGIN INSERT INTO history