Re: [SQL] Order by YYYY MM DD in reverse chrono order trouble

2004-04-23 Thread Stijn Vanroye
Indeed, it seems that I get the same result for a similar query. I'm running version 7.3.4 on a rh 9 server. Also: is the function date_part a function you wrote yourself? I get an error stating that the function date_part(Unknown,date) is not recognized. It maybe not a solution to the actual

Re: [SQL] Order by YYYY MM DD in reverse chrono order trouble

2004-04-23 Thread ogjunk-pgjedan
Hello, Thank you for all your help, Stijn. date_part is a standard PG function. While not the most elegant, the DESC, DESC, DESC solution suggested the other day works okay for me, so I think I'll use that for now. Thanks again! Otis --- Stijn Vanroye [EMAIL PROTECTED] wrote: Indeed, it seems

Re: [SQL] Server Side C programming Environment Set up

2004-04-23 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 18:07 schrieb Tom Lane: I agree with the suggestion elsewhere in the thread about generalizing the contrib Makefile framework to the point that it could be installed as part of the -devel RPM, and then used to build user-written backend functions. It seems to me

[SQL] Record Lock details

2004-04-23 Thread Denis P Gohel
Hi all, I am using PostgreSQL 7.3.1. Is there a data dictionary in Postgres from where i can get the info about locked rows of any table ? If possible the value of those locked record ? My situation is like: I have an ODBC application working on Postgres. There are Master child tables. I

Re: [SQL] Is there an easy way to normalize-space with given string functions

2004-04-23 Thread Janning Vygen
Am Freitag, 23. April 2004 04:34 schrieb Tom Lane: Janning Vygen [EMAIL PROTECTED] writes: i searched the function list and tried to combine to or more functions, but i miss a replace function which uses regular expressions. There isn't one in the SQL standard. Most people who need one

Re: [SQL] Record Lock details

2004-04-23 Thread Peter Eisentraut
Am Freitag, 23. April 2004 10:43 schrieb Denis P Gohel: Is there a data dictionary in Postgres from where i can get the info about locked rows of any table ? If possible the value of those locked record ? No, this information is not available for end users. I have an ODBC application working

Re: [SQL] converting unix seconds to timestamp

2004-04-23 Thread Alexei Chetroi
On Fri, Apr 23, 2004 at 11:46:52AM +0300, Alexei Chetroi wrote: Date: Fri, 23 Apr 2004 11:46:52 +0300 From: Alexei Chetroi [EMAIL PROTECTED] User-Agent: Mutt/1.5.5.1+cvs20040105i To: [EMAIL PROTECTED] Subject: [SQL] converting unix seconds to timestamp Hi, I wish to convert unix

Re: [SQL] Server Side C programming Environment Set up

2004-04-23 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: I'd be happy to write more documentation, howtos, or scripts and tools that enable users to set up a proper build system, but I don't think it's our business to try to write our own build system framework. Any build framework is going to have

Re: [SQL] Server Side C programming Environment Set up

2004-04-23 Thread Bruce Momjian
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: I'd be happy to write more documentation, howtos, or scripts and tools that enable users to set up a proper build system, but I don't think it's our business to try to write our own build system framework. Any build framework

[SQL] CONTEXT on PL/pgSQL

2004-04-23 Thread Martin Marques
I have a simple function made with PL/pgSQL and when I call it I get this in the logs: 2004-04-23 10:15:32 [30669] LOG: statement: SELECT nodoSuperior(22) AS sup 2004-04-23 10:15:32 [30669] LOG: statement: SELECT $1 CONTEXT: PL/pgSQL function nodosuperior line 7 at assignment 2004-04-23

[SQL] Multi ordered select and indexing

2004-04-23 Thread Antal Attila
Hi! We have a complex problematic area. What is the simplest solution for the next query type: SELECT * FROM tablename ORDER BY col1 ASC, col2 DESC; In our experience, postgres cannot use a multi-colum index on (col1, col2) in this situation, becouse there are different directions after

Re: [SQL] CONTEXT on PL/pgSQL

2004-04-23 Thread Martin Marques
El Vie 23 Abr 2004 11:18, Tom Lane escribió: Martin Marques [EMAIL PROTECTED] writes: I have a simple function made with PL/pgSQL and when I call it I get this in the logs: 2004-04-23 10:15:32 [30669] LOG: statement: SELECT nodoSuperior(22) AS sup 2004-04-23 10:15:32 [30669] LOG:

Re: [SQL] Multi ordered select and indexing

2004-04-23 Thread Stephan Szabo
On Fri, 23 Apr 2004, Antal Attila wrote: Hi! We have a complex problematic area. What is the simplest solution for the next query type: SELECT * FROM tablename ORDER BY col1 ASC, col2 DESC; In our experience, postgres cannot use a multi-colum index on (col1, col2) in this situation,

Re: [SQL] Multi ordered select and indexing

2004-04-23 Thread Bruno Wolff III
On Fri, Apr 23, 2004 at 16:33:14 +0200, Antal Attila [EMAIL PROTECTED] wrote: In our experience, postgres cannot use a multi-colum index on (col1, col2) in this situation, becouse there are different directions after ORDER BY. Is custom operator class the easiest solution, which can solve

Re: [SQL] lifetime of temp schema versus compiled image of plpgsql proc

2004-04-23 Thread Jaime Casanova
Hi all, I have a similar problem, i'm connecting to postgresql with th psql-odbc, create a temp table outside the transaction, insert into the temp, commit then i try to use the temp and it isn't there. Maybe an odbc problem?? are you using the odbc?