Re: [GENERAL] debugging C functions

2007-06-03 Thread Islam Hegazy
I do the same but I use the ddd debugger 1) Load the shared library from the SQL 2) Open the .c file of my function 3) Place the break points 4) Execute the sql statement 'Select * from Myfn(...);' The result is displayed and the debugger doesn't stop at the breakpoints. Are there any steps miss

Re: [GENERAL] debugging C functions

2007-06-03 Thread Tom Lane
"Islam Hegazy" <[EMAIL PROTECTED]> writes: > Thanks for your replies, they were very helpful to me. Unfortuantely, I > can't trace the C function. PostgreSQL returns the results directly and the > debugger doesn't stop at the breakpoints in the C function. Well, you need to deal with that last,

Re: [GENERAL] Strange delimiters problem

2007-06-03 Thread Andrej Ricnik-Bay
On 6/3/07, Andrej Kastrin <[EMAIL PROTECTED]> wrote: I am experiencing difficulty in trying to copy the file structure below into PostgreSQL table: ||001||,||Classification||,||Economics||,||N|| ||001||,||Classification||,||Trends||,||Y|| etc... Although I can preprocess the input file with e.

Re: [GENERAL] debugging C functions

2007-06-03 Thread Islam Hegazy
Thanks for your replies, they were very helpful to me. Unfortuantely, I can't trace the C function. PostgreSQL returns the results directly and the debugger doesn't stop at the breakpoints in the C function. I think the problem is in the pointers. I use pointers in my function and I defined th

Re: [GENERAL] why postgresql over other RDBMS

2007-06-03 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: >> So it works right now, except it doesn't have (yet) the infrastructure to >> keep the scans synchronized > Perhaps you only got one read of the table because the process is > essentially self-synchronizing. Right. Multiple seqscans that are anywhere near

Re: [GENERAL] multimaster

2007-06-03 Thread Jeff Davis
On Mon, 2007-06-04 at 00:51 +0200, Alexander Staubo wrote: > True, and when they overlap you tend to want to describe the > validation errors in one place, not two -- either the database or the > app, not both. Relational databases have traditionally argued that > these rules should be in the forme

Re: [GENERAL] monitor stats

2007-06-03 Thread DiegoF
solved. the problem is that miss the line ":: 1 localhost" in /etc/hosts thanks On 6/3/07, Diego Fernando Arce <[EMAIL PROTECTED]> wrote: hello again if, but, I need it is real time not in archives lynx /usr/share/doc/postgresql-8.1.8/html/monitoring-stats.html SELECT pg_stat_get_backend_pi

Re: [GENERAL] High-availability

2007-06-03 Thread Madison Kelly
Lew wrote: Madison Kelly wrote: Being a quite small company, proprietary hardware and fancy software licenses are not possible (ie: 'use oracle' won't help). How much data do you put in the DB? Oracle has a free version, but it has size limits. (Ducking the slings and arrows of outraged

Re: [GENERAL] Multiple customers sharing one database?

2007-06-03 Thread Ron Johnson
On 06/03/07 12:45, Lew wrote: [snip] I am always confused by the overloaded term "database" in such discussions. Do we mean the RDBMS engine, i.e., run separate instances of PG? I sure would recommend against that. Or do we mean it as the PG documentation does, e.g.,

Re: [GENERAL] insane index scan times

2007-06-03 Thread Alvaro Herrera
Sergei Shelukhin escribió: > explain select * from entries inner join stuff on entries.id = > stuff.id; > > -> Seq Scan on stuff (cost=0.00..193344.00 rows=12550400 width=12) > > > set enable_seqscan = off; > > explain select * from entries inner join stuff on entries.id = > stuff.id; > >

Re: [GENERAL] multimaster

2007-06-03 Thread Alexander Staubo
On 6/4/07, Jeff Davis <[EMAIL PROTECTED]> wrote: On Sun, 2007-06-03 at 22:54 +0200, Alexander Staubo wrote: > I agree with you and I don't; as it stands now, it's too hard to > implement validation in the database alone, for the reasons I stated > earlier. But I would love for it to be possible,

Re: [GENERAL] why postgresql over other RDBMS

2007-06-03 Thread PFC
I believe you have made quite a good description of what happens. Index-building isn't very CPU-intensive for integers (geometrics and tsearch is another matter, of course), so building all indexes of a large table in one pass is a possibility that works now, provided you issue all

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-03 Thread PFC
Yeah, it is awful ;^) However the existing system is equally awful because there is no way to enter NULL! Consider this form : First name :Edgar Middle name : J. Last name : Hoover Now, if someone has no middle name, like "John Smith", should we use NULL or "" for the middle nam

Re: [GENERAL] autovacuum vacuums entire database...is this right?

2007-06-03 Thread Alvaro Herrera
[EMAIL PROTECTED] escribió: > It's been about a month and a half, and I'm getting this VACUUM > again. This time, I'm wondering if there's any way to tell if > autovacuum is doing a database-wide vacuum for the sake of xid > wraparound or for some other reason. Is there some sort of entry that >

Re: [GENERAL] multimaster

2007-06-03 Thread Jeff Davis
On Sun, 2007-06-03 at 22:54 +0200, Alexander Staubo wrote: > I agree with you and I don't; as it stands now, it's too hard to > implement validation in the database alone, for the reasons I stated > earlier. But I would love for it to be possible, so that I can be sure > that not even plain SQL can

Re: [GENERAL] collision in serial numbers after INSERT?

2007-06-03 Thread Bill Moran
Steve Lefevre <[EMAIL PROTECTED]> wrote: > > Bill Moran wrote: > > Don't do that. Please let us know what site recommended that so I can > > send an email to the author correcting them. > > > Hello Bill - > > The 'offending' site and article is at > http://www.sitepoint.com/article/site-mysql-p

Re: [GENERAL] Multiple customers sharing one database?

2007-06-03 Thread Michael Glaesemann
On Jun 3, 2007, at 12:45 , Lew wrote: Michael Glaesemann wrote: Unless the database schema is shared by the different customers, I'd set up a separate database for each. There's better security with separate databases, and since different customer's data would never be combined, there's

Re: [GENERAL] There can be only one! How to avoid the "highlander-problem".

2007-06-03 Thread Lew
Erwin Brandstetter wrote: CREATE TABLE mankind ( man_id integer primary key, people_id integer NOT NULL, -- references table people .., but that's irrelevant here .. king boolean NOT NULL DEFAULT false ); The trouble with this is that it models "kingship" as an attribute of eve

Re: [GENERAL] autovacuum vacuums entire database...is this right?

2007-06-03 Thread [EMAIL PROTECTED]
It's been about a month and a half, and I'm getting this VACUUM again. This time, I'm wondering if there's any way to tell if autovacuum is doing a database-wide vacuum for the sake of xid wraparound or for some other reason. Is there some sort of entry that gets put into the log, and if so, what

Re: [GENERAL] collision in serial numbers after INSERT?

2007-06-03 Thread Steve Lefevre
Bill Moran wrote: Don't do that. Please let us know what site recommended that so I can send an email to the author correcting them. Hello Bill - The 'offending' site and article is at http://www.sitepoint.com/article/site-mysql-postgresql-2/3 Instead, do SELECT currval(''), which is guara

Re: [GENERAL] Faster data type for one-length values

2007-06-03 Thread Lew
Ron Mayer wrote: Alvaro Herrera wrote: André Volpato wrote: The ammount of space saved seems pretty clear to me. Yeah, zero most of the time due to alignment. So trading off more I/O for less CPU? I wonder if for any I/O bound database servers it might be worth packing tightly rather than

Re: [GENERAL] High-availability

2007-06-03 Thread Lew
Madison Kelly wrote: Being a quite small company, proprietary hardware and fancy software licenses are not possible (ie: 'use oracle' won't help). How much data do you put in the DB? Oracle has a free version, but it has size limits. (Ducking the slings and arrows of outraged PG fans: I p

[GENERAL] insane index scan times

2007-06-03 Thread Sergei Shelukhin
Create table entries (id bigint primary key, somedata varchar(500)); /* insert ~12mil rows of data, somedata mostly empty */ create table stuff (id bigint, bah int, primary key (id, bah)); insert into stuff (id,bah) select id, 1 from entries; create index blah on stuff(id); vacuum full analyze;

Re: [GENERAL] Delete with subquery deleting all records

2007-06-03 Thread Lew
Francisco Reyes wrote: Lew writes: Strange? Why? Did you expect a particular statistical distribution? Perhaps The impression was that one query was returning everything.. and the other only the records that did not exist in the one table. you were surprised by the extent of the situa

Re: [GENERAL] Multiple customers sharing one database?

2007-06-03 Thread Lew
Rick Schumeyer wrote: I'm developing an application that will be used by several independent customers. Conceptually, the data from one customer has no relation at all to another customer. In fact, each customer's data is private, and you would never combine data from different customers.

Re: [GENERAL] High-availability

2007-06-03 Thread Lew
Alexander Staubo wrote: As a side-note, I sat up pgpool-II today, and was pleasantly surprised about how easy it all was; within two minutes I had two databases in perfect sync on my laptop. It has limitations (such as in its handling of sequences), but compared to Slony it's like a breath of fre

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-03 Thread Scott Ribe
I don't use lo_import and lo_export myself, but is there any way to log their usage? It certainly sounds as though step 1 for this user is to keep track of how much data is handed to PG for each file, and how much data is returned to PG for each file (and how much data is in the file at the time of

Re: [GENERAL] Continuous PITR (was Re: multimaster)

2007-06-03 Thread Scott Ribe
> P.S. it's not the "the cloud" anymore, it's "the tubes". It was always tubes. The cloud was just a convenient simplification for the technically declined ;-) -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)---

Re: [GENERAL] SQL Manager 2007 for PostgreSQL released

2007-06-03 Thread Tino Wildenhain
L. Berger wrote: On May 23, 8:47 am, "EMS Database Management Solutions (SQLManager.net)" <[EMAIL PROTECTED]> wrote: We, here at EMS Database Management Solutions, are pleased to announce SQL Manager 2007 for PostgreSQL - the new major version of the powerful PostgreSQL administration and develo

Re: [GENERAL] multimaster

2007-06-03 Thread Alexander Staubo
On 6/3/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > For example, part of the point of having validations declared on the > model is so that you can raise user-friendly errors (and pipe them > through gettext for localization) such as "Your password must be at > least 4 characters long

Re: [GENERAL] why postgresql over other RDBMS

2007-06-03 Thread Scott Ribe
> So it works right now, except it doesn't have (yet) the infrastructure to > keep the scans synchronized Perhaps you only got one read of the table because the process is essentially self-synchronizing. Whenever one process "gets ahead", it requires a disk read for the next page, which causes it

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-03 Thread Alexander Staubo
On 6/3/07, Ian Harding <[EMAIL PROTECTED]> wrote: On 6/3/07, Alexander Staubo <[EMAIL PROTECTED]> wrote: > Your patch is awful because it would mean there was no way to enter an > empty string in the database. A one-character string containing a > single space is not an empty string. Yeah, it is

Re: [GENERAL] monitor stats

2007-06-03 Thread Diego Fernando Arce
hello again if, but, I need it is real time not in archives lynx /usr/share/doc/postgresql-8.1.8/html/monitoring-stats.html SELECT pg_stat_get_backend_pid(s.backendid) AS procpid, pg_stat_get_backend_activity(s.backendid) AS current_query FROM (SELECT pg_stat_get_backend_idset() AS bac

Re: [GENERAL] multimaster

2007-06-03 Thread Martijn van Oosterhout
On Sun, Jun 03, 2007 at 07:47:04PM +0200, Alexander Staubo wrote: > The creator of Rails is not the only developer working on Rails. There > are Rails developers who disagree with him on these issues, and "his > disciples" does not equate "the community". On the other hand, I admit > that this mind

Re: [GENERAL] Strange delimiters problem

2007-06-03 Thread Andrej Kastrin
hubert depesz lubaczewski wrote: On 6/3/07, *Andrej Kastrin* <[EMAIL PROTECTED] > wrote: ||001||,||Classification||,||Economics||,||N|| ||001||,||Classification||,||Trends||,||Y|| etc... it looks like you should be able to read it using COPY command. some

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-03 Thread Ian Harding
On 6/3/07, Alexander Staubo <[EMAIL PROTECTED]> wrote: On 6/3/07, Ian Harding <[EMAIL PROTECTED]> wrote: > > An empty string is not null! Null means the value is missing, which is > > clearly not the case here. I would say Rails is exactly in the right > > here. When an HTML form is posted, empty

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-03 Thread Alexander Staubo
On 6/3/07, Ian Harding <[EMAIL PROTECTED]> wrote: > An empty string is not null! Null means the value is missing, which is > clearly not the case here. I would say Rails is exactly in the right > here. When an HTML form is posted, empty input boxes are declared as > empty strings, which what the

NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-03 Thread Ian Harding
An empty string is not null! Null means the value is missing, which is clearly not the case here. I would say Rails is exactly in the right here. When an HTML form is posted, empty input boxes are declared as empty strings, which what the user entered. The problem is not with Rails/ActiveRecord b

Re: [GENERAL] general features

2007-06-03 Thread Ron Johnson
On 06/03/07 09:08, Badawy, Mohamed wrote: [snip] Thanks for all of the replies,,, What I mean by clustering is to put the database on many machines. Single database on many machines? Do you mean federation/horizontal scaling, or DR replication or something different. PostgreSQL has master-

Re: [GENERAL] multimaster

2007-06-03 Thread Ian Harding
On 6/2/07, Alexander Staubo <[EMAIL PROTECTED]> wrote: On 6/2/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > I don't know if it's a general problem, but I've been involved in a > using rails and it appears to have it's own way of declaring the > database. It presumes to handle referentia

Re: [GENERAL] multimaster

2007-06-03 Thread Alexander Staubo
On 6/3/07, Ian Harding <[EMAIL PROTECTED]> wrote: Rails propaganda explicitly proposes not "repeating yourself" and [...] The creator of RoR explicitly discourages use of RI, rules, triggers, etc in the database as unnecessary. His disciples take this as gospel. The creator of Rails is not t

Re: [GENERAL] general features

2007-06-03 Thread Badawy, Mohamed
Thanks for all of the replies,,, What I mean by clustering is to put the database on many machines. Best Regards,,, Mohamed Badawy THIS EMAIL AND ANY ATTACHED FILES ARE CONFIDENTIAL. If you are not the intended recipient you are notified that any disclosure, reproduction,co

Re: [GENERAL] general features

2007-06-03 Thread PFC
1-max amount of available storage data. How many hard disks can you buy ? 2-Clustering support. Please be more precise. 3-price. Free. 4-speed. Proportional to the expertise of the DBA. Postgres can be extremely fast if used correctly, it can totall

Re: [GENERAL] Strange delimiters problem

2007-06-03 Thread hubert depesz lubaczewski
On 6/3/07, Andrej Kastrin <[EMAIL PROTECTED]> wrote: ||001||,||Classification||,||Economics||,||N|| ||001||,||Classification||,||Trends||,||Y|| etc... it looks like you should be able to read it using COPY command. something like: copy some_table from stdin with delimiter ',' csv quote '||';

Re: [GENERAL] Turning on logging

2007-06-03 Thread Bill Moran
Owen Hartnett <[EMAIL PROTECTED]> wrote: > > > I know this is in the docs somewhere, and it's probably staring me in > the face, but I haven't been able to find it: > > I'm running 8.2.4 through npgsql - how do I log: > > 1) connections to the database > > 2) updates, deletes, adds > > > Is

[GENERAL] Strange delimiters problem

2007-06-03 Thread Andrej Kastrin
Dear all, I am experiencing difficulty in trying to copy the file structure below into PostgreSQL table: ||001||,||Classification||,||Economics||,||N|| ||001||,||Classification||,||Trends||,||Y|| etc... Although I can preprocess the input file with e.g awk, I would like to know is it possibl

Re: [GENERAL] Need a wee bit more info on PostgreSQL's SSL security options

2007-06-03 Thread Martijn van Oosterhout
On Sun, Jun 03, 2007 at 12:21:14AM +0200, Andreas wrote: > Hi, > > I've got it so far: > Server-OS: Debian 3.1 sarge > PostgreSQL: Debian's binary PG 8.1.8 (still the most recent version > available) > > Following a tutorial (actually for OpenVPN as I didn't find any for PG > that goes beyond wha

Re: [GENERAL] general features

2007-06-03 Thread A. Kretschmer
am Sun, dem 03.06.2007, um 10:34:47 +0200 mailte Badawy, Mohamed folgendes: > Hi all > > am very new to postgres & actually am just collecting information about but I > having a problem with time so I was asking if someone could help me with quick > anserws about these features in postgres. > >

[GENERAL] general features

2007-06-03 Thread Badawy, Mohamed
Hi all am very new to postgres & actually am just collecting information about but I having a problem with time so I was asking if someone could help me with quick anserws about these features in postgres. 1-max amount of available storage data. 2-Clustering support. 3-price. 4-speed.

Re: [GENERAL] Transactional DDL

2007-06-03 Thread PFC
On Sun, 03 Jun 2007 01:39:11 +0200, Tom Lane <[EMAIL PROTECTED]> wrote: "Jaime Casanova" <[EMAIL PROTECTED]> writes: Tom's example seems to show that mysql inserts a commit immidiatelly after a DDL but this one example shows the thing is worse than that. Actually, I think their behavior is ju