Re: [GENERAL] How to auto-increment?

2009-12-03 Thread A. Kretschmer
In response to Andre Lopes : Hi, Pleaase answer to the list and not to me, okay? This is an exemple in ORACLE of what I need. I will see if this works in Postgres. Why not? You have to rewrite it for PostgreSQL, but the way is okay. Another question. It is possible in Postgres to use

[GENERAL] How to auto-increment?

2009-12-02 Thread Andre Lopes
Hi, I have a table like this: id_product id_increment and I need to increment values in id_increment like this prod_1 1 prod_1 2 prod_1 3 prod_2 1 Wich is the best way to do this? Using a trigger? Where can I find examples of plpgsql doing this? Best Regards, André. Sorry for my bad

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread Greg Williamson
, December 2, 2009 2:52:51 PM Subject: [GENERAL] How to auto-increment? Hi, I have a table like this: id_product id_increment and I need to increment values in id_increment like this prod_1 1 prod_1 2 prod_1 3 prod_2 1 Wich is the best way to do this? Using a trigger? Where can I find

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread John R Pierce
Andre Lopes wrote: Hi, I have a table like this: id_product id_increment and I need to increment values in id_increment like this prod_1 1 prod_1 2 prod_1 3 prod_2 1 Wich is the best way to do this? Using a trigger? Where can I find examples of plpgsql doing this?

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread A. Kretschmer
In response to Andre Lopes : Hi,   I have a table like this:   id_product id_increment   and I need to increment values in id_increment like this   prod_1 1   prod_1 2   prod_1 3   prod_2 1   Ahh, you want to count per group, yes? Do you have 8.4? If yes, i would suggest you