Re: [ADMIN] UNIX TIME STAMP

2007-04-03 Thread Alexander Vysokovskih
Hello, Mageshwaran. > Is there any function in postgresql7.1.3 to convert unix time stamp to > normal date and time format select date(timestamp 'epoch' + unixtime_column * interval '1 second') from Table; -- Regards, Alexander Vysokovskih mailto:[EMAIL PROTECTED] -

[ADMIN] plpgsql function question

2007-04-03 Thread Karthikeyan Sundaram
Hi, I am having a requirement here. 1) I need to write a plpgsql function where it takes the input parameter of a structure of a table. 2) The table has 15 columns 3) It does lots of validation based on the parameter and finally returns an integer as output parameters Q) Ho

[ADMIN] exception handling in postgres plpgsql

2007-04-03 Thread Karthikeyan Sundaram
Hi, I am having a function like this create or replace function audio_format_func (in p_bitrate audio_format.audio_bitrate%TYPE,in p_sampling_rate audio_format.sampling_rate%type,in p_bit_per_sample audio_format.bit_per_sample%type,in p_audio_codec audio_format.audio_code

Re: [ADMIN] [SQL] exception handling in postgres plpgsql

2007-04-03 Thread Joe
Hi, On Tue, 2007-04-03 at 15:35 -0700, Karthikeyan Sundaram wrote: > exception >when NO_DATA_FOUND >then > return 100; > end; > $$ > language 'plpgsql'; > > When I compile, I am getting an error message > ERROR: unrecognized exception condition "no_data_found" > CONTEXT: compi

Re: [ADMIN] [SQL] exception handling in postgres plpgsql

2007-04-03 Thread Tom Lane
Karthikeyan Sundaram <[EMAIL PROTECTED]> writes: > When I compile, I am getting an error message > ERROR: unrecognized exception condition "no_data_found"CONTEXT: compile o= > f PL/pgSQL function "audio_format_func" near line 15 > =20 > How will I handle exceptions in postgres? Reading between t