[GENERAL] Still trouble reindexing

2003-07-01 Thread Henrik Steffen
Hello all, this night I got the following error message while reindexing the same table that hat non-unique values the last days: DBD::Pg::st execute failed: ERROR: index_formtuple: data takes 536870936 bytes, max is 8191 [for statement ``REINDEX TABLE kundenstatistik'']) Any hint what that co

Re: [GENERAL] PostgreSQL

2003-07-01 Thread Shridhar Daithankar
On 26 Jun 2003 at 19:09, Ulisses Ponticelli Giorgi wrote: > 1) In my SQL Server database I have about 1,000 Stored > Procedures. In some cases, one SP calls another SP that calls another, > and so on. To do that, I use the EXEC command. I've read that PostgreSQL > only supports functions. Is

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Mike Mascari
Jean-Christian Imbeault wrote: > Maksim Likharev wrote: > >>Finding if the duplicate value exists and inserting if not. > > Ok, thanks but I think it is still vulnerable to a race condition. > >>I do not know how that will work for PG, but in Microsoft SQL Server >>you can do following >>BEGIN T

Re: [GENERAL] ERROR: Relation "pg_user" does not exist

2003-07-01 Thread Tom Lane
"S.Peppe" <[EMAIL PROTECTED]> writes: > it returns this: > ERROR: Relation "pg_user" does not exist Uh ... how old is the server you're connecting to, exactly? The pg_user view has been standard for awhile, I can't blame your psql for assuming it exists ... regar

[GENERAL] Performance question

2003-07-01 Thread Jean-Christian Imbeault
I'm trying to convince another open-source project (phpOpenTracker) to modify their current INSERT sql queries. Currently they just do an INSERT into a table without first checking if their might be a record with the same primary key. The reason for this that they need fast inserts and most use

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Ian Barwick
On Wednesday 02 July 2003 02:58, Jean-Christian Imbeault wrote: (B> Alvaro Herrera wrote: (B> > No, only the "second" one will fail (though it's difficult which one is (B> > the second) (B> (B> From: (B> (B> http://marc.theaimsgroup.com/?l=postgresql-general&m=105656988915991&w=2 (B> (B> I

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Bruno Wolff III
On Wed, Jul 02, 2003 at 12:08:56 +0900, Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > TAL=# insert into b select 'b', select 'b'; > ERROR: parser: parse error at or near "select" at character 27 You probably want: insert into b select 'b', 'b'; ---(end of broadca

[GENERAL] test

2003-07-01 Thread Harry Yau
test ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Reuben D. Budiardja
On Tuesday 01 July 2003 11:08 pm, Jean-Christian Imbeault wrote: (B> Reuben D. Budiardja wrote: (B> > INSERT INTO mytable (B> > SELECT 'value1', 'value2' (B> >WHERE NOT EXISTS (B> > (SELECT NULL FROM mytable (B> > WHERE mycondition) (B> (B> Thank you to every

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Reuben D. Budiardja wrote: (B> (B> INSERT INTO mytable (B> SELECT 'value1', 'value2' (B>WHERE NOT EXISTS (B> (SELECT NULL FROM mytable (B> WHERE mycondition) (B (BThank you to everyone who helped out on my question. I am trying to (Bimplement the abov

Re: [GENERAL] postgresql.org is unreliable

2003-07-01 Thread The Hermit Hacker
On Tue, 1 Jul 2003, Reuben D. Budiardja wrote: > I just upgrade to the last stable mozilla, and it seems fine, at least for now > with initial try. Still don't know what's wrong. I'd be curious as to whether or not you are getting any packet loss between your machine and www.postgresql.org, speci

Re: [GENERAL] updating data but the constraint is set "immediate"

2003-07-01 Thread Rudy Koento
--- Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Tue, Jul 01, 2003 at 02:35:48 -0700, > Rudy Koento <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I've realised that my tables' constraint was set > to > > IMMEDIATE. So, when I update one table, there's > error > > because of referential integri

Re: [GENERAL] postgresql.org is unreliable

2003-07-01 Thread Reuben D. Budiardja
On Tuesday 01 July 2003 08:47 pm, The Hermit Hacker wrote: > On Tue, 1 Jul 2003, Reuben D. Budiardja wrote: > > On Tuesday 01 July 2003 06:54 pm, The Hermit Hacker wrote: > > > On Tue, 1 Jul 2003, Reuben D. Budiardja wrote: > > > > On Tuesday 01 July 2003 06:27 pm, The Hermit Hacker wrote: > > > >

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Reuben D. Budiardja
On Tuesday 01 July 2003 09:25 pm, Jean-Christian Imbeault wrote: (B> Reuben D. Budiardja wrote: (B> > No, onlu *one* of them will fail, but yes, the other will then generate (B> > error. So it really is a trade off. Another way would be to lock the (B> > table, as other has suggested. But then

Re: [GENERAL] Lotus Domino and PostgreSql in Linux

2003-07-01 Thread keith
I'm working on pgSQL integration with Domino6 (DECS, LCLSX) (there will be documentation in the coming weeks). I have a question a couple of questions for you: 1) Are you using Domino 6 or 5.x 2) In your DSN setup on (NT?) do you have the valid account information to connect to Pg? 3) If you a

Re: [GENERAL] ERROR: language "c" is not trusted

2003-07-01 Thread Joe Conway
Chris Albertson wrote: Thanks for the hint. This fixed it: alberts=# UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'c'; UPDATE 1 alberts=# grant USAGE ON LANGUAGE c TO alberts; GRANT Ummm, I doubt that's really what you wanted, was it? Quoting the fine

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Alvaro Herrera
On Tue, Jul 01, 2003 at 06:48:29PM -0700, Dann Corbit wrote: > I assume that PostgreSQL would simply time out both transactions if it > happened in a deadly-embrace pair? > > I searched the PG docs, but could not find a clear answer. No, the deadlock will the detected and one of the transactions

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Dann Corbit
> -Original Message- > From: Alvaro Herrera [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2003 6:37 PM > To: Jean-Christian Imbeault > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [GENERAL] Duplicate key insert question > > > On Wed, Jul 02, 2003 at 10:25:54AM +0900, Jea

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Alvaro Herrera wrote: (B> (B> Well, he is right. One will fail, the other will not. The race (B> condition is for the application. If you want to ignore it, you can do (B> that, but there _will_ be an ERROR thrown and the transaction will be (B> aborted. (B (BAh ... then maybe this solut

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Alvaro Herrera
On Tue, Jul 01, 2003 at 06:26:08PM -0700, Dann Corbit wrote: > > But you should try to use a sequence if at all possible to avoid all > > these problems. > > Does not really avoid the named issue. > > Suppose that you have a dictionary of working part numbers (e.g. Boeing > might have 3 million

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Alvaro Herrera
On Wed, Jul 02, 2003 at 10:25:54AM +0900, Jean-Christian Imbeault wrote: > Reuben D. Budiardja wrote: > > > > No, onlu *one* of them will fail, but yes, the other will then generate error. > > So it really is a trade off. Another way would be to lock the table, as other > > has suggested. But th

Re: [GENERAL] PSQL NEWBIE - RUNTIME ERROR

2003-07-01 Thread Chris Albertson
Assuming the standard install to /usr/local/pgsql you need to add /usr/local/pgsql/lib to the linker's search path and (if Linux) run ldconfig > > ./testlibpq:error in loading shared libraries > > > > libpq.so.2: cannot open shared object file: No such file or > directory. = Chris Albertso

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Reuben D. Budiardja wrote: (B> (B> No, onlu *one* of them will fail, but yes, the other will then generate error. (B> So it really is a trade off. Another way would be to lock the table, as other (B> has suggested. But then there is disadvantages to that also. (B (BReally? I just got a pos

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Dann Corbit
>> -Original Message- >> From: Alvaro Herrera [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, July 01, 2003 5:51 PM >> To: Jean-Christian Imbeault >> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] >> Subject: Re: [GENERAL] Duplicate key insert question >> >> >> On Wed, Jul 02, 2003 at 09:4

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Alvaro Herrera wrote: (B> (B> The thread is here: (B> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3A4D6116.1A613402%40mascari.com&rnum=1&prev=/groups%3Fq%3DMike%2BMascari%2BINSERT%2BNOT%2BEXISTS%26ie%3D (B (BThanks! (B (B> The solution is not correct in that there _i

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Reuben D. Budiardja
On Tuesday 01 July 2003 08:45 pm, Jean-Christian Imbeault wrote: (B> Reuben D. Budiardja wrote: (B> > Hi, not sure if this is answering your question, but I just asked similar (B> > questions here. I asked about using INSERT WHERE NOT EXISTS (which you (B> > can do in PostgreSQL). Here is what

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Alvaro Herrera
On Wed, Jul 02, 2003 at 09:58:28AM +0900, Jean-Christian Imbeault wrote: > Alvaro Herrera wrote: > > > > No, only the "second" one will fail (though it's difficult which one is > > the second) > > I couldn't get the link to work so I couldn't read why Tom shot it down. > But if Tom shot down this

Re: [GENERAL] PSQL NEWBIE - RUNTIME ERROR

2003-07-01 Thread Martijn van Oosterhout
If you link to a library on your system that is not in your library path, you will get this problem. The solutions is basically one of: - Create a symlink to the lib in a directory that is in the path (like /usr/local/lib) - Add the directory to your /etc/ld.so.conf - Add it to your LD_LIBRARY_PAT

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Maksim Likharev wrote: (B> (B> Finding if the duplicate value exists and inserting if not. (B (BOk, thanks but I think it is still vulnerable to a race condition. (B (B> I do not know how that will work for PG, but in Microsoft SQL Server (B> you can do following (B> BEGIN TRANSACTION (B>

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Maksim Likharev
Finding if the duplicate value exists and inserting if not. (B (BAs for the race condition ( your other post ) (BI do not know how that will work for PG, but in Microsoft SQL Server (Byou can do following (BBEGIN TRANSACTION (BUPDATE [val] = [val] (BWHERE (BINSERT ... (BCOMMIT

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Jean-Christian Imbeault
Alvaro Herrera wrote: (B> (B> No, only the "second" one will fail (though it's difficult which one is (B> the second) (B (BFrom: (B (Bhttp://marc.theaimsgroup.com/?l=postgresql-general&m=105656988915991&w=2 (B (BIan Barwick wrote: (B (B[...] (B (BI proposed that same solution 3 years

Re: [HACKERS] [GENERAL] PlPython

2003-07-01 Thread Hannu Krosing
elein kirjutas T, 24.06.2003 kell 00:42: There is a realtively clean hack one can use to convert plpython functions to plpythonu manually - just rename the language for the time of loading functions - do as superuser update pg_language set lanname = 'plpython' where lanname = 'plpythonu'; LOAD Y

Re: [GENERAL] IPv6 data type

2003-07-01 Thread Bruce Momjian
It will be in 7.4. --- Richard Welty wrote: > an IPv6 data type is on the todo list, but it looks like it's been there a > while. > > is there any work being done on this, and is there an ETA? i have a project > that could

Re: [GENERAL] Is news.postgresql.org still alive?

2003-07-01 Thread The Hermit Hacker
Its setup and ppl have been using it to read news ... can you confirm the IP/hostname you are trying to connect from? So that I can check the logs for any specific problems? Is anyone else noticing problems? On Wed, 25 Jun 2003, Dave Bodenstab wrote: > > I used to read the news postings on new

[GENERAL] IPv6 data type

2003-07-01 Thread Richard Welty
an IPv6 data type is on the todo list, but it looks like it's been there a while. is there any work being done on this, and is there an ETA? i have a project that could use it, but if it wasn't coming soon (say in 7.4), i can work around it. it'd just be nice and all that. richard -- Richard Welt

[GENERAL] Administration Documentation....

2003-07-01 Thread Benjamin Jury
Good day, Just printed out all 198 pages of the Administrators Guide which is at http://www.postgresql.com/docs/pdf/7.3/admin-7.3.2-A4.pdf only to find the index is full of question marks where page numbers should be!!! (Well not all granted, but about 95% are!) Arg! ---(e

[GENERAL] Is news.postgresql.org still alive?

2003-07-01 Thread Dave Bodenstab
I used to read the news postings on news.postgresql.org (news.hub.org). Frequently it would refuse to let me connect, but it would then clear up and things would be OK for a while. For the last few weeks I have been unable to connect: connection refused. Have things changed? Do I need to use

[GENERAL] Optimizer/Planner levels

2003-07-01 Thread Daniel Mahler
Hi, I was wondering if there is a way the set levels, or otherwize influence the behaviour of the optimizer. In the near future I will need to do some very large joins of very large tables. I have reason to believe that the final resul will be manageable, but I do not have definite information ab

Re: [GENERAL] postgresql.org is unreliable

2003-07-01 Thread The Hermit Hacker
On Tue, 1 Jul 2003, Reuben D. Budiardja wrote: > > Hi > Does anyone else find the site postgresql.org kinda unreliable? Many times > it's stalled for a while. And it's not just today, but very often. It's > really frustrating especially when I regularly use it to look up > documentation. Is it sp

Re: [GENERAL] postgresql.org is unreliable

2003-07-01 Thread Alvaro Herrera
On Tue, Jul 01, 2003 at 06:12:44PM -0400, Reuben D. Budiardja wrote: > Does anyone else find the site postgresql.org kinda unreliable? Many times > it's stalled for a while. And it's not just today, but very often. It's > really frustrating especially when I regularly use it to look up > docume

[GENERAL] postgresql.org is unreliable

2003-07-01 Thread Reuben D. Budiardja
Hi Does anyone else find the site postgresql.org kinda unreliable? Many times it's stalled for a while. And it's not just today, but very often. It's really frustrating especially when I regularly use it to look up documentation. Is there any mirror to the site ? Thanks. RDB -- Reuben D. Bud

Re: [GENERAL] Create Data Base fails

2003-07-01 Thread Martin Marques
On Mar 01 Jul 2003 10:11, Andrew Gould wrote: > Are you using advanced authentication in phppgadmin? > > Could this be caused when phppgadmin is configured to > have the database superuser connect to template1 to > manage user logins? phpPgAdmin has nothing to do, now that I made some tests. 1) I

[GENERAL] New position and new location

2003-07-01 Thread Jan Wieck
Dear PostgreSQL community, it is with great pleasure that I would like to let you all know that I recently joined Afilias, a domain name registry services company that runs the .info top level domain and also provides core registry services to .org and a variety of other country code TLDs. (http:/

Re: [GENERAL] updating data but the constraint is set "immediate"

2003-07-01 Thread Bruno Wolff III
On Tue, Jul 01, 2003 at 02:35:48 -0700, Rudy Koento <[EMAIL PROTECTED]> wrote: > Hi, > > I've realised that my tables' constraint was set to > IMMEDIATE. So, when I update one table, there's error > because of referential integrity. Reading the docs, I > read that SET CONSTRAINTS has no effect

Re: [GENERAL] updating data but the constraint is set "immediate"

2003-07-01 Thread Stephan Szabo
On Tue, 1 Jul 2003, Rudy Koento wrote: > I've realised that my tables' constraint was set to > IMMEDIATE. So, when I update one table, there's error > because of referential integrity. Reading the docs, I > read that SET CONSTRAINTS has no effect on IMMEDIATE > (and I've confirmed that by trying

Re: [GENERAL] Accent insensitive search

2003-07-01 Thread Alvaro Herrera
On Tue, Jul 01, 2003 at 03:11:54PM +, Alejandro Javier Pomeraniec wrote: > Hi ! Does anyone knows how to make accent insensitive searches?? Convert both the pattern and the column to ASCII with to_ascii > SELECT * FROM testtable WHERE testfield like '%olo%'; SELECT * FROM testtable WHERE to

Re: [GENERAL] Accent insensitive search

2003-07-01 Thread Ian Barwick
On Tuesday 01 July 2003 17:11, Alejandro Javier Pomeraniec wrote: > Hi ! Does anyone knows how to make accent insensitive searches?? > > For example > > i have this data in a table > > > Colón > Polo > > > I need that this query > > SELECT * FROM testtable WHERE testfield like '%o

[GENERAL] Accent insensitive search

2003-07-01 Thread Alejandro Javier Pomeraniec
Hi ! Does anyone knows how to make accent insensitive searches?? For example i have this data in a table Colón Polo I need that this query SELECT * FROM testtable WHERE testfield like '%olo%'; brings both results instead of only showing Polo. Thanks in advance!

Re: [GENERAL] Cannot create unique index

2003-07-01 Thread Tom Lane
"scott.marlowe" <[EMAIL PROTECTED]> writes: > how odd. Since reindex works by dropping the index then recreating it, is > it possible that some process inserted duplicates in the split second > there was no index? No, because reindex holds exclusive lock on the table for the whole process.

Re: [GENERAL] Pg_Dumpall error?

2003-07-01 Thread Tom Lane
"Patrick Hatcher" <[EMAIL PROTECTED]> writes: > I've done numerous dumps, but I've never seen this type of error before: > pg_dumpall > datamart.out > pg_dump: [archiver] could not write to output file (36 != 97) > pg_dumpall: pg_dump failed on bdc_oz, exiting Out of disk space, perhaps? I believ

Re: [GENERAL] PlPython

2003-07-01 Thread Tom Lane
Kevin Jacobs <[EMAIL PROTECTED]> writes: > Only a slight modification is needed: > Each function gets its own execution enviornment in the > Python interpreter, ... Got it, thanks. (For some reason this message seems to have been delayed.) regards, tom lane ---

Re: [GENERAL] PlPython

2003-07-01 Thread Tom Lane
Kevin Jacobs <[EMAIL PROTECTED]> writes: > On Mon, 30 Jun 2003, Tom Lane wrote: >> I've also commented out the paragraph about global data and function >> arguments pending resolution of the question. Given the reference to >> restricted execution objects in the original text, I would think that >

Re: [GENERAL] Cannot create unique index

2003-07-01 Thread Henrik Steffen
Hello, before the reindexing starts, the webserver is always shut down. as there are no database-users except the web-users, there should not be a possibility of inserting a non-unique value just between DROP INDEX and CREATE INDEX allthough, sometimes an apache child process may take a few

Re: [GENERAL] Create Data Base fails

2003-07-01 Thread Andrew Gould
Are you using advanced authentication in phppgadmin? Could this be caused when phppgadmin is configured to have the database superuser connect to template1 to manage user logins? Andrew Gould --- Martin Marques <[EMAIL PROTECTED]> wrote: > OK, the picture is the latest CVS of phpPgAdmin on > Pos

Re: [GENERAL] Cannot create unique index

2003-07-01 Thread Martijn van Oosterhout
Unlikely. Create index takes a write lock on a table. Reindex takes an exclusive lock (or something like that). Unless something really bad happens it shouldn't be a problem. I've had index corruption before. We're running 7.0 (upgrading Real Soon Now) and there are certain situations that can cor

[GENERAL] C++ functions under Windows

2003-07-01 Thread Yuriy Rusinov
Hello ! I have to develop c++ function for PostgreSQL 7.3.1 under Windows 2000, what compilers and linkers may be used for this purposes ? I have Visual C++ 6.0 and C++Builder 5.0 . May I use them ? Best regards, Sincerely yours, Yuriy Rusinov. ---(end of broadcast)-

Re: [GENERAL] Cannot create unique index

2003-07-01 Thread scott.marlowe
how odd. Since reindex works by dropping the index then recreating it, is it possible that some process inserted duplicates in the split second there was no index? for safety's sake, I've always reindexed in a transaction: begin; drop index bubba; create index bubba on ... commit; On Tue, 1 J

Re: [GENERAL] numeric formats in SELECT

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, javier garcia - CEBAS wrote: > Hi all; > I've got a table with real type data. And, in the SELECT, some of the columns > are displayed in scientific format. I don't like this, and I would prefer > that the number were shown with two decimal digits. > Is this possible? Does s

Re: [GENERAL] 2 different versions of postgres on the same system

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Madhavi Daroor wrote: > Hi all, > I have installed postgres 7.3 in my Red hat linux 7.2 system. I want to > also install postgres 7.2.3 in the same system. Is it possible?? Can > somebody please tell me how I can do this...ASAP!!! Oh, and you need to ./configure --prefix=

Re: [GENERAL] 2 different versions of postgres on the same system

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Madhavi Daroor wrote: > Hi all, > I have installed postgres 7.3 in my Red hat linux 7.2 system. I want to > also install postgres 7.2.3 in the same system. Is it possible?? Can > somebody please tell me how I can do this...ASAP!!! Just what the other message said, with on

[GENERAL] Create Data Base fails

2003-07-01 Thread Martin Marques
OK, the picture is the latest CVS of phpPgAdmin on PostgreSQl 7.3.1. I created a user with createDB option. Here OK. I connect to phpPgAdmin as that user and try to create a DB and I get this error: Error de SQL: ERROR: CREATE DATABASE: source database "template1" is being accessed by other u

Re: [GENERAL] Cannot create unique index

2003-07-01 Thread Henrik Steffen
yes, there were duplicates -- Mit freundlichem Gruß Henrik Steffen Geschäftsführer top concepts Internetmarketing GmbH Am Steinkamp 7 - D-21684 Stade - Germany http://www.topconcepts.com Tel. +49 4141 991230 mail: [EMAIL PROTECTE

[GENERAL] numeric formats in SELECT

2003-07-01 Thread javier garcia - CEBAS
Hi all; I've got a table with real type data. And, in the SELECT, some of the columns are displayed in scientific format. I don't like this, and I would prefer that the number were shown with two decimal digits. Is this possible? Best regards Javier ---(end of broadcas

[GENERAL] updating data but the constraint is set "immediate"

2003-07-01 Thread Rudy Koento
Hi, I've realised that my tables' constraint was set to IMMEDIATE. So, when I update one table, there's error because of referential integrity. Reading the docs, I read that SET CONSTRAINTS has no effect on IMMEDIATE (and I've confirmed that by trying it out). Is there anyway I can circumvent t