Re: [HACKERS] [pgsql-advocacy] Not 7.5, but 8.0 ?

2003-11-18 Thread Christoph Haller
Joshua D. Drake wrote: Hello, If Win32 actually makes it into 7.5 then yes I believe 8.0 would be appropriate. It might be interesting to track Oracle's version number viz. its feature list. IOW, a PostgreSQL 8.0 database would be feature equivalent to an Oracle 8.0 database.

Re: [HACKERS] *sigh*

2003-12-03 Thread Christoph Haller
Fairly good idea IMHO, especially considering Christopher's point about the unlikeliness of needing an exact count anyway. Regards, Christoph How about: Implement a function estimated_count that can be used instead of count. It could use something like the algorithm in

Re: [HACKERS] Disaster!

2004-01-29 Thread Christoph Haller
Tom Lane wrote: I said: If there wasn't disk space enough to hold the clog page, the checkpoint attempt should have failed. So it may be that allowing a short read in slru.c would be patching the symptom of a bug that is really elsewhere. After more staring at the code, I have

Re: [HACKERS] Prepared select

2004-04-14 Thread Christoph Haller
How can I use a prepared select statement as mentioned in the documentation= on SQL PREPARE. Preparing the statement is easy, the problem is using the = plan to get a cursor. My assumption is the SQL OPEN command is not document= ed or there is some other libpq API to make this happen.

Re: [HACKERS] executing prepared select, missing RowDescription info

2004-04-19 Thread Christoph Haller
- Begin Forwarded Message - From To:[EMAIL PROTECTED] Mon Apr 19 11:08:57 2004 Date: Mon, 19 Apr 2004 11:08:57 METDST To: [EMAIL PROTECTED] (Tom Lane) Subject: Re: [HACKERS] executing prepared select, missing RowDescription info In-Reply-To: [EMAIL PROTECTED]; from Tom

[HACKERS] IpcSemaphoreKill: ...) failed: Invalid argument

2003-02-17 Thread Christoph Haller
Hi, I've seen this (see below) in the postmaster's log-file. I doubt this is normal behaviour. I'm using PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by GCC 2.95.2 Does anybody know what may cause calls to semctl resp. shmctl (semaphore control resp. shared memory control) to fail? The

Re: [HACKERS] IpcSemaphoreKill: ...) failed: Invalid argument

2003-02-17 Thread Christoph Haller
This is a fairly spectacular failure :-(. As far as I can see from the semctl and shmctl man pages, the only plausible reason for EINVAL is that something had deleted the semaphores and shared memory out from under Postgres. I do not believe that Postgres itself could have done that ---

Re: [HACKERS] Group by, count, order by and limit

2003-02-18 Thread Christoph Haller
Consider this query on a large table with lots of different IDs: SELECT id FROM my_table GROUP BY id ORDER BY count(id) LIMIT 10; It has an index on id. Obviously, the index helps to evaluate count(id) for a given value of id, but count()s for all the `id's should be evaluated, so

Re: [HACKERS] pg environment? metadata?

2003-02-18 Thread Christoph Haller
I was wondering what kind of functions/constants exist in Postgre to dig up metadata. I barely scratched the surface of Oracle but I know you find things like user_tables there that can be used to extract info about your tables. What I'm looking for is some kind of functions to extract

[HACKERS] ecpg vs. libpq

2003-02-21 Thread Christoph Haller
I am wondering if there is any difference in performance between using ecpg and libpq. If I understand the concept of ecpg correctly, calls to the lecpg interface are internally converted to calls to libpq. So there is no big difference at all. Is this right? Regards, Christoph

[HACKERS] ecpg vs. libpq

2003-02-21 Thread Christoph Haller
I am wondering if there is a fundamental difference in performance between using embedded SQL or libpq functions in a C application. If I understand the documentation correctly, calls to lecpg are simply transferred to calls to libpq. So, the difference in performance is, if any, marginal. Is

[HACKERS] REPEATED INSERT INTO ...

2003-02-24 Thread Christoph Haller
I've noticed subsequent executions of the same insert command are slow. I've searched the list archives for this matter and found several entries related, including suggestions how to speed up. The standard answer from the core team is, use COPY. Sorry, but this is from an application point of

Re: [HACKERS] REPEATED INSERT INTO ...

2003-02-25 Thread Christoph Haller
The key word REPEATED directs INGRES to encode the INSERT and save its execution plan when it is first executed. This encoding can account for significant performance improvements on subsequent executions of the same INSERT. What do you others think of it? You can do that today with

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Christoph Haller
How can I get information is TRANSACTION already started ? I did not mean 'TRANSACTION ISOLATION LEVEL', but 'TRANSACTION LEVEL' ! OK, it is bad construction - my fault ! What I meant is : IS-TRANSACTION-ALREADY-STARTED ? I used 'TRANSACTION LEVEL' because I saw that Bruce is working on

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Christoph Haller
On Tuesday 25 February 2003 09:28, Christoph Haller wrote: On Mon, Feb 24, 2003 at 07:53:05PM +, Darko Prenosil wrote: I need two answers I did not find in documentation : How can I get exact number of rows in DECLARED CURSOR ? OK, I can FETCH until NULL, but this does

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Christoph Haller
On Mon, Feb 24, 2003 at 07:53:05PM +, Darko Prenosil wrote: I need two answers I did not find in documentation : How can I get exact number of rows in DECLARED CURSOR ? OK, I can FETCH until NULL, but this does not fits my needs ! You may want to use FETCH ALL, otherwise what or

Re: [HACKERS] Can pessimistic locking be emulated?

2003-02-27 Thread Christoph Haller
I am trying to emulate a pessimistic locking system you would find in an old school database file system, for example cobol. Generally, when a cobol program tries to read a record that is locked by somebody else, the read fails and either a message is displayed by the user or a error

Re: [HACKERS] numeric datataypes as seperate library

2003-02-27 Thread Christoph Haller
Michael Meskes kirjutas K, 26.02.2003 kell 13:00: Did anyone ever think about creating a library that is able to handle our numeric datatype? I'm currently thinking about adding this datatype among others to the ones know to ecpg so no one is forced to convert them or work on the

Re: [HACKERS] Can pessimistic locking be emulated?

2003-02-27 Thread Christoph Haller
That's my fallback position. Obviously, this will lead to false positives depending on server load. In my case, I'm targeting between 30-50 users so its likely to throw timeouts for various reasons other than locks even though my queries of interest are generally select a from b where id

Re: [HACKERS] Can pessimistic locking be emulated?

2003-02-28 Thread Christoph Haller
Just as a suggestion: In most of my applications, we have a security layer which is implemented through server-side functions. These functions keep a table updated which contains: lock_table record_id lock_user time_locked That's an excellent and even portable idea. This allows us to

Re: [HACKERS] Error codes revisited

2003-03-06 Thread Christoph Haller
Given the repeatedly-asked-for functionalities (like error codes) for which the stopper has been the long-threatened protocol revision, I'd think it might be boring, but would hardly be thankless. Heck, I'd expect a few whoops of joy around the lists. Yes. Error codes would be great.

Re: [HACKERS] talking to postgresql from C/C++

2003-03-07 Thread Christoph Haller
Have you seen libpq - C Library Functions Associated with the COPY Command This is best way to INSERT large amounts of data. Regards, Christoph ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[HACKERS] gmake -C regress check failure

2003-03-11 Thread Christoph Haller
Maybe this is related to the thread [HACKERS] regression failure in CVS HEAD I've installed postgresql-7.3.2 on HP-UX yesterday. When running 'gmake -C regress check' the process does not return. File ./src/test/regress/regression.out shows parallel group (13 tests): float8 int2 varchar text

Re: [HACKERS] gmake -C regress check failure

2003-03-11 Thread Christoph Haller
Christoph Haller [EMAIL PROTECTED] writes: I've installed postgresql-7.3.2 on HP-UX yesterday. When running 'gmake -C regress check' the process does not return. See doc/FAQ_HPUX: : The parallel regression test script (gmake check) is known to lock up : when run under HP's Bourne

Re: [HACKERS] [SQL] What's wrong with this group by clause?

2003-03-13 Thread Christoph Haller
On Tue, 4 Nov 2003 18:28:12 -0300, Franco Bruno Borghesi [EMAIL PROTECTED] wrote: Below you can find a simplified example of a real case. I don't understand why I'm getting the john record twice. ISTM you have found a Postgres 7.3 bug. I get one john with PostgreSQL 7.1.3 on

Re: [HACKERS] timestamp/date in ecpg

2003-03-21 Thread Christoph Haller
I started working on date/timestamp in ecpg. So far I can read date types from the DB and I can insert date into the DB. However there seems to be a bug in converting timestamp to ascii or vice versa. If anyone of you knows more about timestamp2tm etc. could you please have a look at

Re: [HACKERS] timestamp/date in ecpg

2003-03-21 Thread Christoph Haller
Hmm, maybe the transformation in the other direction is the culprit. What I do is call ts1 = PGTYPEStimestamp_atot(2000-7-12 17:34:29, NULL); followed by a text = PGTYPEStimestamp_ttoa (ts1); Needless to say the resulting text is not 2000-7-12 17:34:29. :-( I could not dig too deep into the

Re: [HACKERS] can't create database

2003-04-03 Thread Christoph Haller
on one of the AIX4.3.3, the 7.1.3 pgsql is installed by root on the system, then I tried to install 7.3.1/or 7.3.2 under another non-root user, I can run make, make check, make install, postmaster can start without errors, but when I try to createdb, here're some errors - createdb

Re: [HACKERS] FROM clause omitted

2003-07-16 Thread Christoph Haller
I had a bug in one of my queries that wasn't detected by pg because if filled in the from clause by itself. Take for example a querie like select foo.a; which I guess is transformed to select foo.a from foo; Is this really a good thing to do? Is it part of the standard? Can it be

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Christoph Haller
Rod Taylor wrote: -- Start of PGP signed section. On Fri, 2003-07-18 at 19:46, Paulo Scardine wrote: My boss is asking for something like Oracle's SELECT FOR UPDATE NOWAIT. Is there any such feature? If no, should I look forward into implementing this? Any advice? Lookup

Re: [HACKERS] Exception table ...

2003-07-23 Thread Christoph Haller
I have just seen a nice feature provided by DB2 which seems very useful to me. When importing huge amounts of data (dozens of gigs) with the help of COPY errors might occur from time to time (especially when migrating). The problem with COPY is that it stops after the first error. So if the

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-24 Thread Christoph Haller
Paulo Scardine wrote: LockAcquire has a dontWait parameter, which do just what I want. The executor level calls heap_open(relid, RowShareLock) when doing FOR UPDATEs. Should we define something like RowShareLockNoWait, so heap_open() or other lower level functions can call

Re: [HACKERS] no of affected rows in prepared stmts

2003-08-14 Thread Christoph Haller
hi whenever i call an execute on a prepared statement, i get the return value of PQcmdTuples() as NULL even if the query did modify tuples... how can i get the number of affected tuples? thanx in adv. rahul I'm observing the same pretty odd behavior. Do we both expect something wrong.

[HACKERS] Copyright (C) 1996-2002

2003-08-15 Thread Christoph Haller
the approval of the moderators, for the following reason(s): The author (Christoph Haller [EMAIL PROTECTED]) is not a member of any of the restrict_post groups. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [HACKERS] change of table name - any help

2003-09-19 Thread Christoph Haller
We have a development server running OS - Linux development-server 2.4.20-openmosix-r4 #1 SMP Mon May 19 02:32:52 PDT 2003 i686 Intel(R) Xeon(TM) CPU 2.40GHz GenuineIntel GNU/Linux Database - PostgreSQL 7.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.1 We have a table ctcert_name

Re: [HACKERS] Automatic compat checking? (was 7.4 compatibility question)

2003-10-23 Thread Christoph Haller
On Wednesday 22 October 2003 07:37, Neil Conway wrote: The second audience is the people who are really interested in exactly what has changed between the new release of PostgreSQL and the previous release series. It is important that we make it easy for an admin planning a PostgreSQL

Re: [HACKERS] An interisting conundrum where tables have a column called found

2003-10-28 Thread Christoph Haller
I am putting together a DB that records information about a set of web sites and how they link to one another. As one site refers to another, I monitor the first site and then record when I find the referred site. [snip] I also have a function called add_site that adds the newly found