[SQL] Convert int to hex

2005-06-01 Thread Fernando Grijalba
I want to be able to change an int4 from a sequence and store it as varchar in the database as a hex number. Is this possible? Thank you, Fernando ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Release feature

2005-06-01 Thread Jaime Casanova
On 6/1/05, Marx Barbosa <[EMAIL PROTECTED]> wrote: > Hi Everybody > > I'd like to know which release of postgresql included the trapping errors > sintaxe below > > BEGIN > ... > EXCEPTION > WHEN OTHERS THEN > .. > END; > > I tried to use this sintaxe with 7.4.7 release and did not works! > > Th

[SQL] Release feature

2005-06-01 Thread Marx Barbosa
Hi Everybody I'd like to know which release of postgresql included the trapping errors sintaxe below BEGIN ... EXCEPTION WHEN OTHERS THEN .. END; I tried to use this sintaxe with 7.4.7 release and did not works! Thanks in advance! Marx Haron ---(end of broadcast)-

[SQL] unsubscribe

2005-06-01 Thread Ing. Jhon Carrillo - Caracas, Venezuela
unsubscribe ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Sum() rows

2005-06-01 Thread Bruno Wolff III
On Wed, Jun 01, 2005 at 08:49:00 -0300, [EMAIL PROTECTED] wrote: > Yes, > I tried it. In this table the query works fine, but in a big table > (with aprox. > 200.000 records) the query performace is very bad. > I tried it (in the example table): > SELECT *,(select sum(value) from tb1 as tb1_2 w

Re: [SQL] View unique rowid

2005-06-01 Thread Achilleus Mantzios
O David Klugmann έγραψε στις Jun 1, 2005 : > > Hi > Is it possible to refer to a unique row identifier on a view ? > > I have the following view but in a subsequent select I need to refer to > each row's unique identifier and I know oid's are not valid for a view. Provided your ids are 4 bytes

Re: [SQL] View unique rowid

2005-06-01 Thread David Klugmann
Many thanks I think the problem with using the oid from the primary table is that may rows in the view definition will get the same oid because of the union. Thanks very much anyway. I will look at the temporary sequence although I am not sure if sequences work with views. Regards David

Re: [SQL] View unique rowid

2005-06-01 Thread Rafa Couto
> Is it possible to refer to a unique row identifier on a view ? > > I have the following view but in a subsequent select I need to refer to > each row's unique identifier and I know oid's are not valid for a view. You can get an oid from some table in view definition. May be it results to resol

[SQL] View unique rowid

2005-06-01 Thread David Klugmann
Hi Is it possible to refer to a unique row identifier on a view ? I have the following view but in a subsequent select I need to refer to each row's unique identifier and I know oid's are not valid for a view. create view persontransit as select personid, planet, name as aspectname, position as

Re: [SQL] Sum() rows

2005-06-01 Thread lucas
Hi. The function works well... I will use your function and rewrite it to accept more than one select, becouse in this case you selected all records from tb1 table. In real case the table is bigger with many fields and I will work with some filters and some ordering (dynamically)... Thank you.

Re: [SQL] Sum() rows

2005-06-01 Thread lucas
Yes, I tried it. In this table the query works fine, but in a big table (with aprox. 200.000 records) the query performace is very bad. I tried it (in the example table): SELECT *,(select sum(value) from tb1 as tb1_2 where tb1_2.id<=tb1_1.id) as subtot from tb1 as tb1_1 order by id; In a small