Re: [GENERAL] REVOKE CONNECT doesn't work in 8.3.5

2008-12-19 Thread Zoltan Boszormenyi
Tom Lane írta: > Zoltan Boszormenyi writes: > >> I have "trust" entries in pg_hba.conf because my machine is closed. >> I added some PG users, and one of them was used in: >> > > >> REVOKE CONNECT ON DATABASE zozo FROM hs; >>

[GENERAL] REVOKE CONNECT doesn't work in 8.3.5

2008-12-19 Thread Zoltan Boszormenyi
Hi, It seems REVOKE CONNECT doesn't work as advertised. I have "trust" entries in pg_hba.conf because my machine is closed. I added some PG users, and one of them was used in: REVOKE CONNECT ON DATABASE zozo FROM hs; However, user "hs" can happily connect to database "zozo" despite the REVOKE. D

Re: [GENERAL] Favorite Tom Lane quotes

2008-12-02 Thread Zoltan Boszormenyi
Klint Gore írta: > Scott Marlowe wrote: >> On Mon, Dec 1, 2008 at 10:42 PM, Joshua D. Drake >> <[EMAIL PROTECTED]> wrote: >> > On Tue, 2008-12-02 at 00:37 -0500, Greg Smith wrote: >> >> Tom on things that might ruin his tape backups: >> >> >> >> "Then of course there are the *other* risks, such as

Re: [GENERAL] SERIAL datatype

2008-08-26 Thread Zoltan Boszormenyi
Mark Roberts írta: > On Mon, 2008-08-25 at 11:02 -0600, Scott Marlowe wrote: > >> Well, of course a 64 bit int is gonna be bigger than a 32 bit, but >> with alignment issues and on 64 bit hardware, I'm guessing the >> difference isn't exactly twice as slow / twice as much storage. And >> it's w

Re: [GENERAL] PostgreSQL vs FreeBSD 7.0 as regular user

2008-07-26 Thread Zoltan Boszormenyi
Zoltan Boszormenyi írta: > Joshua D. Drake írta: > >> On Fri, 2008-07-25 at 22:39 +0200, Zoltan Boszormenyi wrote: >> >> >>> Hi, >>> >>> is there anyone using PostgreSQL on FreeBSD 7.0 starting from scratch? >>> I compiled 8.

Re: [GENERAL] PostgreSQL vs FreeBSD 7.0 as regular user

2008-07-25 Thread Zoltan Boszormenyi
Francisco Reyes írta: > On 4:53 pm 07/25/08 Zoltan Boszormenyi <[EMAIL PROTECTED]> wrote: > >> I don't know. How to determine? Running this as my own user: >> > > Is this your own machine or at an ISP? > It's my own machine, FreeBSD is instal

Re: [GENERAL] PostgreSQL vs FreeBSD 7.0 as regular user

2008-07-25 Thread Zoltan Boszormenyi
Joshua D. Drake írta: > On Fri, 2008-07-25 at 22:39 +0200, Zoltan Boszormenyi wrote: > >> Hi, >> >> is there anyone using PostgreSQL on FreeBSD 7.0 starting from scratch? >> I compiled 8.3.3 and wanted to run initdb in my home directory but >> it fails with

[GENERAL] PostgreSQL vs FreeBSD 7.0 as regular user

2008-07-25 Thread Zoltan Boszormenyi
Hi, is there anyone using PostgreSQL on FreeBSD 7.0 starting from scratch? I compiled 8.3.3 and wanted to run initdb in my home directory but it fails with the error below. [EMAIL PROTECTED] ~]$ PGDATA=/home/zozo/pgd833 PATH=/home/zozo/pgc833/bin:$PATH

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Zoltan Boszormenyi
Tom Lane írta: > Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > >> The realtime trace I captured from the hung INSERT shows that it >> enters two functions repeatedly: _bt_relandgetbuf() and _bt_compare(). >> The pattern in which these functions entered m

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-12 Thread Zoltan Boszormenyi
Gregory Stark írta: > "Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: > > >> Also, VACUUM FULL also takes too much time, on an otherwise idle database, I >> worked on a copy of their live database. During VACUUM, _bt_getbuf() was >> also called repe

[GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-06 Thread Zoltan Boszormenyi
Hi, we have a customer with PostgreSQL 8.0.3 with a quite interesting problem. They have around 24 identical databases and all but one is working nicely. The one that doesn't work nicely show this problem: INSERT "hangs" on an apparently empty table where "select count(*)" returns 0 quite quickly.

Re: [GENERAL] How to tell if 64 bit vs 32 bit engine?

2008-04-18 Thread Zoltan Boszormenyi
Keaton Adams írta: I did search the archives for this But didn’t see a posting that directly answered the question. How do I tell if the 32 bit version of PostgreSQL is running on a 64 bit machine, or if the 64 bit version was installed? Is there a pg_ table that I can query or a config f

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Zoltan Boszormenyi
Ivan Sergio Borgonovo írta: On Wed, 09 Jan 2008 20:29:39 +0100 Zoltan Boszormenyi <[EMAIL PROTECTED]> wrote: The decision to use MVCC in PostgreSQL makes the point moot. ... thanks. In PostgreSQL, COUNT(*) responds closely at the same speed regardless of other transa

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Zoltan Boszormenyi
Ivan Sergio Borgonovo írta: On Wed, 9 Jan 2008 13:04:39 +0100 "Harald Armin Massa" <[EMAIL PROTECTED]> wrote: Ivan, Please forgive my naiveness in this field but what does it mean an "exact count" and what other DB means with "an exact count" and how other DB deal with it?

Re: [GENERAL] select using an index

2007-11-27 Thread Zoltan Boszormenyi
Pau Marc Munoz Torres írta: Hi Recently i created an index in a table using a function (not a column) as following create index H2IAb on precalc (idr(p1,p4,p6,p7,p9,'H-2*IAb'));, where idr is a function that returns a real number, as a result i got the following table mhc2db=> \d precalc;

Re: [GENERAL] What's the difference between SET STORAGE MAIN and EXTENDED?

2007-09-07 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: At the end of the day, the behaviour is the same, isn't it? No, there's a difference in terms of the priority for pushing this column out to toast storage, versus pushing other columns of the row out to toa

[GENERAL] What's the difference between SET STORAGE MAIN and EXTENDED?

2007-09-06 Thread Zoltan Boszormenyi
Hi, according to http://www.postgresql.org/docs/8.2/interactive/storage-toast.html: EXTENDED allows both compression and out-of-line storage. This is the default for most TOAST-able data types. Compression will be attempted first, then out-of-line storage if the row is still too big. MAIN a

Re: [GENERAL] PostgreSQL and Crystal Report

2007-09-05 Thread Zoltan Boszormenyi
[EMAIL PROTECTED] írta: Hi All. I've the necessity to use Crystal Report in my C++ project to report (in PDF) some PostgreSQL table. Any idea how to implement this functionality in my C++ project, or where I can find some useful CR documentation? All the Crystal Report documentation I found is

Re: [GENERAL] URGENT: Whole DB down ("no space left on device")

2007-08-31 Thread Zoltan Boszormenyi
Phoenix Kiula írta: I am getting this message when I start the DB: psql: FATAL: could not access status of transaction 0 DETAIL: Could not write to file "pg_subtrans/01F8" at offset 221184: No space left on device. What is this about and how do I solve this? A "df -h" on my system shows thi

Re: [GENERAL] Moved postgres, now won't start

2007-07-16 Thread Zoltan Boszormenyi
Hi, Madison Kelly írta: Hi all, I've created a small 2-node (Debian Etch, PgSQL8.1) cluster using a (shared) DRBD8 partition formatted as ext3 running in Primary/Secondary mode. I shut down postgresql-8.1, moved '/etc/postgresql' and '/etc/postgres-commin' to '/ha/etc' (where '/ha' is

[GENERAL] What's the correct way to use FunctionCallInvoke()?

2007-06-07 Thread Zoltan Boszormenyi
Hi, I have a problem calling a C function from another C function - DirectFunctionCall* cannot be used since some parameters may be NULL. This dies: FunctionCallInfoData fcinfo1; InitFunctionCallInfoData(fcinfo1, NULL, 7, NULL, NULL); /* arg[] and arnull[] are filled with correct values */

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

2007-06-04 Thread Zoltan Boszormenyi
Alexander Staubo írta: On 6/4/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: On Mon, Jun 04, 2007 at 12:37:42AM +0200, PFC wrote: > NULL usually means "unknown" or "not applicable" Aaaargh! No, it doesn't. It means NULL. Nothing else. If it meant unknown or not applicable or anything else,

Re: [GENERAL] why postgresql over other RDBMS

2007-05-26 Thread Zoltan Boszormenyi
Zoltan Boszormenyi írta: If you ask me, yes. When I had to choose between MySQL 3.x and PostgreSQL 6.5 a long ago and I was able to exclude the DB superuser with REVOKE CONNECT from MySQL, I said "no, thanks". I did it on purpose to prove that you can the external configuration is bett

Re: [GENERAL] why postgresql over other RDBMS

2007-05-26 Thread Zoltan Boszormenyi
If you ask me, yes. When I had to choose between MySQL 3.x and PostgreSQL 6.5 a long ago and I was able to exclude the DB superuser with REVOKE CONNECT from MySQL, I said "no, thanks". I did it on purpose to prove that you can the external configuration is better in this case. And apart from fixi

Re: [GENERAL] /var/run/postgresql ??

2007-05-08 Thread Zoltan Boszormenyi
Hi, Manuel Preliteiro írta: Hello, i have installed postgresql version 8.1.4-1.1 in Fedora 6 I have the same system. Since I'm very Linux unexperienced I used yum for this purpose. I have all the commands installed, liek createdb (under /usr/bin/createdb witch is not the location specified

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Zoltan Boszormenyi
CaT írta: On Thu, Feb 22, 2007 at 09:13:13AM +0100, Zoltan Boszormenyi wrote: Chris ?rta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: create table a(a text not null check (char_length(a) > 0)); What's wrrong with

Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Zoltan Boszormenyi
Chris írta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: In postgres, to stop an empty blank string: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thing? Nothing, I just thought of

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Zoltan Boszormenyi
Scott Marlowe írta: ouch! I stand corrected. Of course, I didn't register to vote either. Are there more firebird users in hungary (.hr right?) than postgresql maybe? I wonder. Then stand a bit longer. :-) Hungary is .hu, .hr is for Hrvatska which is Croatia for English speakers. Best r

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Zoltan Boszormenyi írta: Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 01:40:22PM +0100, Zoltan Boszormenyi wrote: text_in() doesn't exists, it's textin() but I have to call it through DirectFunctionCall1(), like this: yeardatum = DirectFunctionCall1(textin, CStri

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 01:40:22PM +0100, Zoltan Boszormenyi wrote: text_in() doesn't exists, it's textin() but I have to call it through DirectFunctionCall1(), like this: yeardatum = DirectFunctionCall1(textin, CStringGetDatum("year&qu

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 12:55:47PM +0100, Zoltan Boszormenyi wrote: However, I have another problem. I have this in the code: yeardatum = CStringGetDatum("year"); elog(NOTICE, "CStringGetDatum() 1 OK")

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 09:48:25AM +0100, Zoltan Boszormenyi wrote: Hi, I need to call date_part() from a C function. How to do that? Look in fmgr.h for the functions {Oid,Direct,}FunctionCall* which provide various ways to call other functions

[GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, I need to call date_part() from a C function. How to do that? Thanks in advance, Zoltán Böszörményi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster