Re: [GENERAL] Query planner refuses to use index

2005-07-25 Thread Kilian Hagemann
On Friday 22 July 2005 15:23, Michael Fuhr pondered: Did you run VACUUM ANALYZE or just ANALYZE? Could we see the output of VACUUM ANALYZE VERBOSE speed? I just ran a plain ANALYZE then. When I VACUUM ANALYZE the table the (inferior) sequential scan strategy is still chosen over the index

[GENERAL] Need help with data validation..

2005-07-25 Thread Hannes Dorbath
Hi, we are refactoring a larger merchandise management system atm. It's a more complex schema with about 120 relations. In the current system we have parts of the bussines logic in the DBMS and other parts, that we had problems implementing in pl/pgsql, in the app itself. Our goal is to move

[GENERAL] PostgreSQL, Lazarus and zeos ?

2005-07-25 Thread Zlatko Matić
Hi. Someone mentioned Lazarus as good IDE for working with PostgreSQL, so that's the reason I started to learn Lazarus... Now, I was told that I need to install ZEOS library in order to work with PostgreSQL. I downloaded the following .zip files: zeosdbo-5.0.7-beta, zeosctrl-1.0.0-beta. I

[GENERAL] Creating a record in a database encoded 'WIN1250'/'WIN'

2005-07-25 Thread Josef Springer
Hi, i want to creat the record: INSERT INTO OfficeTalk.substitute (substitutedid,substituterid,name,category,classtype) VALUES (?,?,?,?,?) (3 | 4 | 'Polizeneingang' | 'Abschluß' | 'ST' | ) The last three columns are defined as String. If i use a database with standard encoding 'SQL_ASCII'

Re: [GENERAL] Wishlist?

2005-07-25 Thread Ezequiel Tolnay
Jim C. Nasby wrote: On Thu, Jul 21, 2005 at 07:10:03PM +1000, Ezequiel Tolnay wrote: * Allow FETCH command to be used with CREATE TABLE tab AS qry (in place of qry) I'm not really clear on what you're looking for here.. Fetching from a cursor should be equivalent to selecting from a table,

Re: [GENERAL] Wishlist?

2005-07-25 Thread Ezequiel Tolnay
Alvaro Herrera wrote: Tom Lane wrote: What I see is that the overloading is a very cool feature, but is not necessary in most cases, and it introduces unnecessary administration hassles. What are those unnecessary administration hassles? I'm not seeing what could be so bad as to merit the

Re: [GENERAL] Wishlist?

2005-07-25 Thread Ezequiel Tolnay
Roman Neuhauser wrote: What would your hassle-free CREATE OR REPLACE do in this situation? What should the fiew look like after you replace foo() with foo(int4)? CREATE TYPE t1 AS ( a INTEGER, b INTEGER, c INTEGER ); CREATE TYPE t1 AS ( a TEXT, c

[GENERAL] PGSQL programmer needed!!!

2005-07-25 Thread Jeffrey Cook
All, I am pleased to announce the first Dimension Laboratories Black-Op development project. Of course nothing more will be announced otherthan that I need a PostgreSQL programmer. This is a contract job and will likely take only a few hours of programming. $ negotiable, butmust be a U.S.

Re: [GENERAL] Query planner refuses to use index

2005-07-25 Thread Michael Fuhr
On Mon, Jul 25, 2005 at 11:23:01AM +0200, Kilian Hagemann wrote: shared_buffers, effective_cache_size and cpu_index_tuple_cost all have their default values of 1000, 1000 and 0.001 respectively. From their descriptions I gather that's reasonable and I don't know how I would optimise these for

[GENERAL] transaction timeout

2005-07-25 Thread Dr NoName
Hi all, We are using PostgreSQL in a mission-critical application. For the most part it works really well. However, we are repeatedly running into one problem: sometimes our client application hangs while in transaction and that locks up the entire database, so that nothing else can access it. It

Re: [GENERAL] Bad locking with MS-Access

2005-07-25 Thread Zlatko Matic
Hello, Andreas! You mentioned: Use serial or serial4 to create auto-values. Don't use any bigint-types like bigserial. Access doesn't like 8-byte-ints.. Could you please explain why you don't recommend bigserial for primary key ? I use bigserial primary keys in Postgres tables, and din't

Re: [GENERAL] PostgreSQL, Lazarus and zeos ?

2005-07-25 Thread Tony Caduto
You don't have to use Zeos, there are a couple of others, I think one is mentioned right on the Lazarus home page. The Zeos code will work on Delphi or Lazarus, it uses compiler directives to detect if you are installing on Delphi or Lazarus. I would suggest you go out to the zeos page on

Re: [GENERAL] transaction timeout

2005-07-25 Thread Tom Lane
Dr NoName [EMAIL PROTECTED] writes: However, we are repeatedly running into one problem: sometimes our client application hangs while in transaction and that locks up the entire database, so that nothing else can access it. Why is your client taking such strong locks in the first place?

Re: [GENERAL] transaction timeout

2005-07-25 Thread Martijn van Oosterhout
Firstly, what are the clients doing to lock the database? Normal selects, deletes and updates don't really use locks at all. Secondly, your OS should be noticing when the client dies and telling PostgreSQL so it can clean up. Could you provide more detail about what you are actually doing so we

Re: [GENERAL] Connection error

2005-07-25 Thread Richard Huxton
WA Pennant Flag Displays - Darren wrote: Hi Richard, Thanks for your advice. I implemented your tests as shown below and they seem to indicate there's a firewall problem (but the firewall is off). I found though that I can probably retrieve the data and have discussed what I've been trying

Re: [GENERAL] Wishlist?

2005-07-25 Thread Martijn van Oosterhout
On Mon, Jul 25, 2005 at 11:35:14AM +1000, Ezequiel Tolnay wrote: Functions are not the same as stored procedures, but since PG lacks stored procedures, there is a necessity to use functions instead. Ok, maybe I'm missing something, but the only difference between a procedure and a function is

Re: [GENERAL] Bad locking with MS-Access

2005-07-25 Thread Andreas
Hi Zlatko, You mentioned: Use serial or serial4 to create auto-values. Don't use any bigint-types like bigserial. Access doesn't like 8-byte-ints.. Could you please explain why you don't recommend bigserial for primary key ? I use bigserial primary keys in Postgres tables, and din't

[GENERAL] mass grant on sequences script

2005-07-25 Thread Michael Behan
Hello, all! Attached is a simple bash script to do a mass grant on all sequences in a DB. This is meant to complement grantall.sh by f3ew, Elein and RevTresh. I realize there are probably more efficient ways of doing this with psql shortcuts, but I am no guru with the psql command line.

Re: [GENERAL] Connection error

2005-07-25 Thread Jonathan Lam
unsubscribe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Huxton Sent: Monday, July 25, 2005 10:43 AM To: WA Pennant Flag Displays - Darren Cc: [EMAIL PROTECTED]; pgsql-general@postgresql.org Subject: Re: [GENERAL] Connection error WA Pennant

Re: [GENERAL] Wishlist?

2005-07-25 Thread Chris Browne
kleptog@svana.org (Martijn van Oosterhout) writes: On Mon, Jul 25, 2005 at 11:35:14AM +1000, Ezequiel Tolnay wrote: Functions are not the same as stored procedures, but since PG lacks stored procedures, there is a necessity to use functions instead. Ok, maybe I'm missing something, but the

Re: [GENERAL] Wishlist?

2005-07-25 Thread Tony Caduto
Even in Pascal a procedure and a function are the same except one returns a result, the other does not. And it C++ everything is a function, you just set the return type to void for a proc. But AFAICS this is a distinction made by people (like in Pascal) but is not a distinction at all. As

[GENERAL] db slowness + upgrade prospects

2005-07-25 Thread Ed L.
Our inserts and updates on an older 7.3.4 cluster are very slow (0.3s-0.9s) for any/all tables, new and old. I know an upgrade may be in order, but I have a number of other 7.3.4 legacy clusters, and I'd really like to understand the cause and if an upgrade is going to solve this problem

[GENERAL] pgsql client/server compatibility matrix?

2005-07-25 Thread Ed L.
Can someone help find (or create) a client/server compatibility matrix that shows which client versions are compatible with which server versions? For example, server: 7.1.2 7.2.1 7.2.2 7.2.3 ... client == 7.1.2 YesNo NoNo ... 7.2.1 No 7.2.2 No 7.2.3

Re: [GENERAL] pgsql client/server compatibility matrix?

2005-07-25 Thread Martijn van Oosterhout
What do you mean by client version? If you're talking about libpq, then any version can talk to any version of the DB (AFAIK). It's all compatable. pg_dump should be able to dump any older version. It's a bug otherwise. If you're talking about psql, well, within major versions for full

[GENERAL] speeding up a query on a large table

2005-07-25 Thread Kevin Murphy
I'm trying to speed up a query on a text column of a 14M-row table. Uncached query times vary between 1-20 seconds (maybe more), depending on the search term. In between time trials I've been trying to flush the disk buffer cache by selecting count(*) from a separate 4GB table, and times are

Re: [GENERAL] db slowness + upgrade prospects

2005-07-25 Thread Scott Marlowe
On Mon, 2005-07-25 at 16:17, Ed L. wrote: Our inserts and updates on an older 7.3.4 cluster are very slow (0.3s-0.9s) for any/all tables, new and old. I know an upgrade may be in order, but I have a number of other 7.3.4 legacy clusters, and I'd really like to understand the cause and if

Re: [GENERAL] pgsql client/server compatibility matrix?

2005-07-25 Thread Scott Marlowe
On Mon, 2005-07-25 at 16:17, Ed L. wrote: Can someone help find (or create) a client/server compatibility matrix that shows which client versions are compatible with which server versions? For example, server: 7.1.2 7.2.1 7.2.2 7.2.3 ... client == 7.1.2 YesNo No

Re: [GENERAL] db slowness + upgrade prospects

2005-07-25 Thread Martijn van Oosterhout
Check the sizes of your relations, it may be that your indexes are getting large. Under certain situations, older versions of postgresql would have indexes grow forever. Try REINDEX on various tables. Also, the output of vacuum should give you hints as to large tables/indexes. Hope this helps,

Re: [GENERAL] pgsql client/server compatibility matrix?

2005-07-25 Thread Scott Marlowe
On Mon, 2005-07-25 at 16:56, Martijn van Oosterhout wrote: What do you mean by client version? If you're talking about libpq, then any version can talk to any version of the DB (AFAIK). It's all compatable. pg_dump should be able to dump any older version. It's a bug otherwise. But FYI that

[GENERAL] constraint problem

2005-07-25 Thread Martín Marqués
I have a table with a login, password and confirmed columns (besides others), and I'm having so trouble getting this contraint to work. The account is created with login and password NULL and confirmed set to false. Once the user gives the app he's login and password (login is unique) the

Re: [GENERAL] constraint problem

2005-07-25 Thread Stephan Szabo
On Mon, 25 Jul 2005, [iso-8859-1] Martín Marqués wrote: I have a table with a login, password and confirmed columns (besides others), and I'm having so trouble getting this contraint to work. The account is created with login and password NULL and confirmed set to false. Once the user gives

Re: [GENERAL] constraint problem

2005-07-25 Thread Michael Fuhr
On Mon, Jul 25, 2005 at 08:28:32PM -0300, Martín Marqués wrote: I tried adding this CONSTRAINT to the table definition, but with no luck: CONSTRAINT nonuloconfirmado CHECK ((login NOT NULL AND password NOT NULL) OR NOT confirmado) It gives an error on the first NULL.

Re: [GENERAL] pgsql client/server compatibility matrix?

2005-07-25 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Mon, 2005-07-25 at 16:56, Martijn van Oosterhout wrote: pg_dump should be able to dump any older version. It's a bug otherwise. But FYI that backwards compatibility was introduced around 7.3 or 7.4 version. Before that you'd have issues. I know