Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
The idea is that you _can_ do without a cronjob. You may need to do a first ANALYZE just to get things warmed up, and then let autovacuum do its job. Thanks guys, I think I have it now! Cheers Antoine ---(end of broadcast)--- TIP 4: Have you sear

Re: [GENERAL] postgres at startup

2006-11-09 Thread Richard Huxton
Michael McCloskey wrote: Postgres is starting automatically for me at startup. When I boot up my machine and then check the running processes I see postmaster.exe and 4 postgres processes. How can I stop this? I don't want Postgres starting up automatically. On a linux machine, there are a set

Re: [GENERAL] blocking function in PL/Python

2006-11-09 Thread Richard Huxton
Ottavio Campana wrote: suppose we have a stored procedure written in PL/Python. What happens if the function blocks for a while? Does the server still works for the other clients? Yes. Each client has its own backend process. Although, if you've taken locks that might block other clients. -

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Richard Broersma Jr
> Hmm, I thought this would be obvious. Vacuumdb just issues "VACUUM" > commands. > > I would like the get the functionality if autovacuum so that I don't > waste cycles on tables that don't really need vacuuming. However, we've > had bad luck letting autovacuum run on its own terms, so we've

Re: [GENERAL] LIKE OPERATOR cardinality estimation

2006-11-09 Thread Tom Lane
"sumit kumar" <[EMAIL PROTECTED]> writes: > Can any1 please please help me know how pgsql estimates the cardinality of > LIKE operator ?? See patternsel() and subsidiary routines in http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c for whichever version you are inte

Re: [GENERAL] 8.1.2 postmaster died

2006-11-09 Thread Tom Lane
Ed Loehr <[EMAIL PROTECTED]> writes: > Is there any circumstance at all under which pgsql itself would > issue a sigkill to one of the backends? No. Other signals yes, but not SIGKILL. regards, tom lane ---(end of broadcast)--

[GENERAL] how can i prove that this issue on PG 8.0.0 ERROR: index "patient_pkey" is not a btree is solved in 8.0.9

2006-11-09 Thread surabhi.ahuja
hi I am using Postgres 8.0.0 and we found this issue "ERROR:  index "patient_pkey" is not a btree" I have been informed that we should shift to Postgres 8.0.9   I discussed this with my team member and they are asking if we can upgrade to the latest Postgres version i.e. 8.1.5   I have some

Re: [GENERAL] Problem with pg_dump

2006-11-09 Thread Brent Wood
A. Kretschmer wrote: am Thu, dem 09.11.2006, um 13:04:31 -0500 mailte Alex Turner folgendes: I seem to be having a problem with pg_dump in 8.1.2, it's not dumping indexes at all. Is this a known problem, should I just do an upgrade? I can't see a necessity to dump a index. But, i hop

[GENERAL] Survey...Please do help and Respond!!

2006-11-09 Thread d-licious
Hi, I am doing a project on the database industry and would appreciate if you all could answer a few questions for me! · What do you think of Oracle providing support for Red Hat Linux? · What database(s) are you currently using, what operating system does it run on, and what database options are

[GENERAL] LIKE OPERATOR cardinality estimation

2006-11-09 Thread sumit kumar
Can any1 please please help me know how pgsql estimates the cardinality of LIKE operator ??ThanksSumit

Re: [GENERAL] 8.1.2 postmaster died

2006-11-09 Thread Ed Loehr
On Wednesday November 8 2006 12:30 pm, Shoaib Mir wrote: > To be specific you need to look at the syslogs to see if it > was actually some OOM killer or not. I checked all db logs + syslog, of course. All they show is the process receiving SIGKILL (followed by all others being shutdown as a res

[GENERAL] Linux vs. FreeBSD

2006-11-09 Thread Bart McFarling
We are installing a new Postgresql server, it will not run anything else but postgresql. We are currently looking at moving from a RHEL 4.0 system to FreeBSD. Does one OS offer better performace over the other when running postgresql?   Thanks, Bart  

[GENERAL] postgres at startup

2006-11-09 Thread Michael McCloskey
Title: postgres at startup Postgres is starting automatically for me at startup. When I boot up my machine and then check the running processes I see postmaster.exe and 4 postgres processes. How can I stop this? I don’t want Postgres starting up automatically. Thanks. -Michael

RE : Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-09 Thread Desmond Coughlan
X-No-Archive: true   Yep...   192.168.0.254 - - [07/Nov/2006:10:12:57 +0100] "GET /php_experimental/base.php HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" D.Ben <[EMAIL PROTECTED]> a écrit : Have you checked your webserver error logs?On Mon, 6 Nov 2006, Desmond Cou

RE : Re: RE : Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-09 Thread Desmond Coughlan
X-No-Archive: true   Ah...   [Wed Nov 08 09:32:56 2006] [error] [client 192.168.0.254] PHP Fatal error:  Call to undefined function:  pg_connect() in /usr/local/www/data/php_experimental/base.php on line 6   Ben <[EMAIL PROTECTED]> a écrit : No, that's the access log. Check the error log.On

Re: [GENERAL] 8.1.2 locking issues

2006-11-09 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > Can someone explain why 6508 has a transactionid ExclusiveLock, > but now is waiting on a transactionid ShareLock? That seems > unintuitive. It would seem that if you hold a more exclusive > lock, getting a less exclusive lock would not be a problem. They're

[GENERAL] Multiple currencies in a application

2006-11-09 Thread novnov
I'm working on an application that will eventually need to support various currencies. I've never touched this area before, have dealt with dollars till now. I'm not sure what the regular practices are re mulitple currencies in the same application. The app includes calculations like price per un

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Hitoshi Harada
> Since our nightly window of relative inactivity continues to shrink, I'd > like to vacuum/analyze only the tables that autovacuum thinks need it, > all at once, and only when I tell it to (via cron). I thought as you did and posted a thread, where I proposed a C function smartvacuum() which you

Re: [GENERAL] 8.1.2 locking issues

2006-11-09 Thread Ed L.
I have a few questions on pgsql locking terms and such... I created the following view to make viewing the locks a little easier: -- CREATE OR REPLACE VIEW locksview AS -- SELECT l.*, r.*, a.*, now() - a.query_start as query_age, --substring(replace(current_query, '\n', ' '), 1, 30) as

Re: [GENERAL] Remote tables infrastructure.

2006-11-09 Thread Dawid Kuroczko
On 11/10/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Dawid Kuroczko" <[EMAIL PROTECTED]> writes:> Methinks it would be good idea to discuss a more general approach,> i.e.  don't "create" links using existing infrastructure but rather > provide something conceptually similar to CREATE AGGREGATE stateme

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Richard Broersma Jr
> Richard Broersma Jr wrote: > >> Cron yes, vacuumdb no. I would like to AUTO vacuum periodically. > > Just curious, what is auto_vacuum going to give that vacuumdb wont? > Hmm, I thought this would be obvious. Vacuumdb just issues "VACUUM" > commands. > I would like the get the functionality if

Re: [GENERAL] zero values in statistic views

2006-11-09 Thread Cornelia Boenigk
Hi Tom > But you didn't say what the ps output showed. ps aux | grep stats postgres 24979 0.0 0.0 24416 3780 ?SNov07 0:07 postgres: stats buffer process postgres 24980 0.0 0.0 24684 4024 ?SNov07 0:10 postgres: stats collector process Regards Conni ---

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Glen Parker
Richard Broersma Jr wrote: Cron yes, vacuumdb no. I would like to AUTO vacuum periodically. Just curious, what is auto_vacuum going to give that vacuumdb wont? Hmm, I thought this would be obvious. Vacuumdb just issues "VACUUM" commands. I would like the get the functionality if autova

Re: [GENERAL] zero values in statistic views

2006-11-09 Thread Tom Lane
Cornelia Boenigk <[EMAIL PROTECTED]> writes: > stats_row_level and stats_block_level are disabled in postgresql.conf. > I used the SET command to activate them. That's not going to accomplish a lot --- it'll only cause the session you did the SET in to report to the stats collector. You need to

Re: [GENERAL] zero values in statistic views

2006-11-09 Thread Cornelia Boenigk
Tom, thanks for the quick response. stats_row_level and stats_block_level are disabled in postgresql.conf. I used the SET command to activate them. > If it's not running, look in the postmaster log right after > restarting the postmaster; there may be a message there about why > not. I canno

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index) when adding an additional join

2006-11-09 Thread Thomas H.
I wrote: This didn't matter a whole lot back when the planner couldn't reorder outer joins, but now that it can, it's more important that the estimates be accurate. I'm not sure if this is feasible to fix before 8.2, but I'll take a look. Actually, the changes were far more localized than I

Re: [GENERAL] RULE - special variables?

2006-11-09 Thread Matthew Peter
--- Richard Huxton wrote: > Matthew Peter wrote: > > Do rules get special variables like triggers? Can I set variables in them > > like > > triggers? > > You get NEW/OLD but they mean something subtly different. Rules act on a > query-tree so they are more like placeholders. > > You can't s

Re: [GENERAL] dblink / plpgsql - definition list cheats for record

2006-11-09 Thread Matthew Peter
--- Richard Huxton wrote: > Matthew Peter wrote: > > Is there any way to use CREATE TYPE or an VIEW/TABLE defintion list instead > > of > > manually defining it? > > Yes, just define your function as returning that type rather than > RECORD. That way the calling context will know what to expe

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Richard Broersma Jr
> Cron yes, vacuumdb no. I would like to AUTO vacuum periodically. Just curious, what is auto_vacuum going to give that vacuumdb wont? Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Remote tables infrastructure.

2006-11-09 Thread Tom Lane
"Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > Methinks it would be good idea to discuss a more general approach, > i.e. don't "create" links using existing infrastructure but rather > provide something conceptually similar to CREATE AGGREGATE statements. > In other words, make a remote link a fir

Re: [GENERAL] zero values in statistic views

2006-11-09 Thread Tom Lane
Cornelia Boenigk <[EMAIL PROTECTED]> writes: > I would like to see what is going on in a database using the statistic > views. > I am superuser, > stats_start_collector = on > stats_row_level = on > stats_block_level = on That all looks OK, but it sounds like the stats collector is not running a

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index) when adding an additional join

2006-11-09 Thread Tom Lane
I wrote: > This didn't matter a whole lot back when the planner couldn't reorder > outer joins, but now that it can, it's more important that the estimates > be accurate. > I'm not sure if this is feasible to fix before 8.2, but I'll take a > look. Actually, the changes were far more localized th

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Glen Parker
Joshua D. Drake wrote: On Thu, 2006-11-09 at 17:00 -0800, Glen Parker wrote: I would like a way to run the autovacuum daemon on demand periodically. Every night at 2 AM, for example. Anybody know if this is possible? If not, it's a feature request :-) use vacuumdb and cron. Cron yes, v

[GENERAL] blocking function in PL/Python

2006-11-09 Thread Ottavio Campana
suppose we have a stored procedure written in PL/Python. What happens if the function blocks for a while? Does the server still works for the other clients? signature.asc Description: OpenPGP digital signature

Re: [GENERAL] AutoVacuum on demand?

2006-11-09 Thread Joshua D. Drake
On Thu, 2006-11-09 at 17:00 -0800, Glen Parker wrote: > I would like a way to run the autovacuum daemon on demand periodically. >Every night at 2 AM, for example. > > Anybody know if this is possible? If not, it's a feature request :-) use vacuumdb and cron. Joshua D. Drake > > -Glen >

[GENERAL] Remote tables infrastructure.

2006-11-09 Thread Dawid Kuroczko
Hello. One nice feature of PostgreSQL's CREATE FUNCTION/RULE/VIEW system is ability to create objects which "may appear closer than they really are". Hence, all the dbi-link-like modules. The usual method is to create a view on a set returning function (if reasonable), create RULEs for managing

[GENERAL] AutoVacuum on demand?

2006-11-09 Thread Glen Parker
I would like a way to run the autovacuum daemon on demand periodically. Every night at 2 AM, for example. Anybody know if this is possible? If not, it's a feature request :-) -Glen ---(end of broadcast)--- TIP 1: if posting/reading through Use

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index) when adding an additional join

2006-11-09 Thread Tom Lane
"Thomas H." <[EMAIL PROTECTED]> writes: >> Um, what's the datatype of sm_info_ean and dvd_ean exactly? > varchar(15) and varchar(14) OK. I was wondering if you'd tried to use the new contrib/isn code and it was messing up the estimates somehow. Seems like a red herring. After looking more clos

[GENERAL] zero values in statistic views

2006-11-09 Thread Cornelia Boenigk
Hi all I would like to see what is going on in a database using the statistic views. I am superuser, stats_start_collector = on stats_row_level = on stats_block_level = on select * from pg_stat_user_tables; select * from pg_stat_user_indexes; select * from pg_statio_user_tables select * from

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index) when adding an additional join

2006-11-09 Thread Thomas H.
SELECT * FROM shop.dvds LEFT JOIN oldtables.movies ON mov_id = dvd_mov_id LEFT JOIN shop.data_soundmedia ON sm_info_ean = dvd_ean WHERE (lower(mov_name) LIKE '%superman re%' OR lower(dvd_name) like '%superman re%' OR lower(dvd_edition) LIKE '%superman re%') Um, what's the datatype of sm_info_ean

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index) when adding an additional join

2006-11-09 Thread Tom Lane
"Thomas H." <[EMAIL PROTECTED]> writes: > SELECT * FROM shop.dvds > LEFT JOIN oldtables.movies ON mov_id = dvd_mov_id > LEFT JOIN shop.data_soundmedia ON sm_info_ean = dvd_ean > WHERE (lower(mov_name) LIKE '%superman re%' OR lower(dvd_name) like > '%superman re%' OR lower(dvd_edition) LIKE '%super

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Alvaro Herrera
Anton Melser wrote: > On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >Anton Melser wrote: > > > >> Thanks for that. Just a clarification, can someone tell me what the > >> "number of tuples" means in the context of the multipliers? I mean, > >> when the vacuum min multiplier is at 0.4, we

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Anton Melser wrote: > Thanks for that. Just a clarification, can someone tell me what the > "number of tuples" means in the context of the multipliers? I mean, > when the vacuum min multiplier is at 0.4, we multiply 0.4 by what? I > get the

Re: [GENERAL] Can non-superuser install c functions ?

2006-11-09 Thread Martijn van Oosterhout
On Thu, Nov 09, 2006 at 04:04:33PM -0500, Rick Schumeyer wrote: > I am transferring a database from a system where I am a pg superuser to > one where I am not. > results in: permission denied for language c > > Do I need to get the pg administrator to install my database ? Yes. Letting someon

[GENERAL] Can non-superuser install c functions ?

2006-11-09 Thread Rick Schumeyer
I am transferring a database from a system where I am a pg superuser to one where I am not. The database uses tsearch2. I am unable to install any of the functions. For example: CREATE FUNCTION gtsvector_in(cstring) RETURNS gtsvector AS '$libdir/tsearch2', 'gtsvector_in' LANGUAGE c ST

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Alvaro Herrera
Anton Melser wrote: > Thanks for that. Just a clarification, can someone tell me what the > "number of tuples" means in the context of the multipliers? I mean, > when the vacuum min multiplier is at 0.4, we multiply 0.4 by what? I > get the min val, but what are we multiplying by 0.4? The total nu

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Jorge Godoy
"Andrus" <[EMAIL PROTECTED]> writes: > Jorge, > > Thank you very much. Now I try to William Leite Araújo solution by replacing > > WHERE (a,b) OVERLAPS (c,d) > > with > > WHERE ( c BETWEEN a AND b ) OR ( d BETWEEN a AND b ) > > Is this OK ? From bare tests this looks OK. > This requires writi

Re: [GENERAL] authentication question

2006-11-09 Thread Craig White
On Thu, 2006-11-09 at 16:34 -0300, Alvaro Herrera wrote: > Tom Lane wrote: > > Craig White <[EMAIL PROTECTED]> writes: > > > I haven't had to fool too much with pam for authenticating other > > > services so I'm a little bit out of my knowledge base but I know that it > > > was simple to add netata

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Jeff Davis
On Thu, 2006-11-09 at 18:16 +0100, Anton Melser wrote: > On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Anton Melser wrote: > > > Hi, > > > I just can't understand why autovacuum is not working. I have a test > > > db/table which I insert values into (by the thousands) and can't work >

Re: [GENERAL] authentication question

2006-11-09 Thread Alvaro Herrera
Tom Lane wrote: > Craig White <[EMAIL PROTECTED]> writes: > > I haven't had to fool too much with pam for authenticating other > > services so I'm a little bit out of my knowledge base but I know that it > > was simple to add netatalk into the pam authentication and expected that > > postgresql wou

[GENERAL] Installation Instruction For Window

2006-11-09 Thread Vernon _
Where I can find the instruction on-line? I only see the UNIX/LINUX instruction. I installed PG on window before, but can't remember how it is done right now. BTW, is the 8.2 beta good for a development environment? Thanks, vernon

Re: [GENERAL] authentication question

2006-11-09 Thread Tom Lane
Craig White <[EMAIL PROTECTED]> writes: > On Thu, 2006-11-09 at 11:51 -0500, Tom Lane wrote: >> FWIW, we ship this PAM config file in the Red Hat PG RPMs: > that doesn't work at all... /var/log/messages reports... Sorry, I should have mentioned that that was for recent Fedora branches. In RHEL4 I

Re: [GENERAL] Can PostgreSQL notify a client that a trigger has fired?

2006-11-09 Thread Richard Huxton
Jeff Davis wrote: On Thu, 2006-11-09 at 10:16 +, Richard Huxton wrote: Bill wrote: Jorge Godoy wrote: I have the impression that you're missing a lot of sections in the manual... How about some time to re-read it? I don't know about you but for me a 1500 page manual is at least two week

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Andrus
>> WHERE (a,b) OVERLAPS (c,d) >> >> to >> >> WHERE (a-1,b+1) OVERLAPS (c-1,d+1) >> >> Will this give correct results ? > > It might give you false positives... > > 2006-11-30 -- 2006-12-05 AND2006-12-06 -- 2006-12-15 (original) -- > FALSE > 2006-11-29 -- 2006-12-06 AND2006-12-05 -- 200

Re: [GENERAL] Problem with pg_dump

2006-11-09 Thread A. Kretschmer
am Thu, dem 09.11.2006, um 13:04:31 -0500 mailte Alex Turner folgendes: > I seem to be having a problem with pg_dump in 8.1.2, it's not dumping indexes > at all. Is this a known problem, should I just do an upgrade? I can't see a necessity to dump a index. But, i hope, and i'm sure, pg_dump dump

Re: [GENERAL] Can PostgreSQL notify a client that a trigger has

2006-11-09 Thread Jeff Davis
On Thu, 2006-11-09 at 10:16 +, Richard Huxton wrote: > Bill wrote: > > Jorge Godoy wrote: > > > >> I have the impression that you're missing a lot of sections in the > >> manual... How about some time to re-read it? > > > > I don't know about you but for me a 1500 page manual is at least two

[GENERAL] Problem with pg_dump

2006-11-09 Thread Alex Turner
I seem to be having a problem with pg_dump in 8.1.2, it's not dumping indexes at all.  Is this a known problem, should I just do an upgrade?Thanks,Alex TurnerMint Pixels

Re: [GENERAL] authentication question

2006-11-09 Thread Craig White
On Thu, 2006-11-09 at 11:51 -0500, Tom Lane wrote: > Craig White <[EMAIL PROTECTED]> writes: > > I haven't had to fool too much with pam for authenticating other > > services so I'm a little bit out of my knowledge base but I know that it > > was simple to add netatalk into the pam authentication a

Re: [GENERAL] Too many open cursors

2006-11-09 Thread Scott Marlowe
On Thu, 2006-11-09 at 06:07, Sandeep Kumar Jakkaraju wrote: > > Hi All .. > > I have used Oracle 9i in the past ...currently working on postgres ... > > Oracle throws this SQLException ... Too many open cursors > when there are too many connections to the database. That may be the excep

Re: [GENERAL] Datum problem

2006-11-09 Thread A. Kretschmer
am Thu, dem 09.11.2006, um 18:12:08 +0100 mailte Enrico folgendes: > Hi, > I'm newbie of programming postgresql sever side, > I write the function below and when I execute > > SELECT (anag_art, 150) AS esistenza from anag_art order by 1; Try select *, 150 AS esistenza from anag_art order by 1;

Re: [GENERAL] Datum problem

2006-11-09 Thread Martijn van Oosterhout
On Thu, Nov 09, 2006 at 06:12:08PM +0100, Enrico wrote: > Hi, > I'm newbie of programming postgresql sever side, > I write the function below and when I execute > > SELECT (anag_art, 150) AS esistenza from anag_art order by 1; > > result is something about this: Well, you didn't actually call a

Re: [GENERAL] Mac OS X

2006-11-09 Thread Steve Atkins
On Nov 9, 2006, at 9:10 AM, Nathan Leon Pace, MD, MStat wrote: I run an older version of psql (7.2.4) on a Linux machine. I wish to migrate psql to an Intel Mac running OS x 10.4.8. The supported platforms table in postgresql-8.1-US.pdf (page 259) lists Mac OS X with a PPC cpu as being supp

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Anton Melser wrote: > Hi, > I just can't understand why autovacuum is not working. I have a test > db/table which I insert values into (by the thousands) and can't work > out why my stats don't get updated. Could someone have a quick look at

Re: [GENERAL] Mac OS X

2006-11-09 Thread Joshua D. Drake
On Thu, 2006-11-09 at 10:10 -0700, Nathan Leon Pace, MD, MStat wrote: > I run an older version of psql (7.2.4) on a Linux machine. > > > I wish to migrate psql to an Intel Mac running OS x 10.4.8. > > > The supported platforms table in postgresql-8.1-US.pdf (page 259) > lists Mac OS X with a PP

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Jorge Godoy
"Andrus" <[EMAIL PROTECTED]> writes: >> Why not just subtract/add 1, so that the check includes the boundary >> dates? >> >> Like so; >> select 1 where ('2006-10-31'::date -1, '-12-31'::date +1) OVERLAPS >>('2006-10-16'::DATE -1, '2006-10-31':: DATE +1) > > Alban, > > thank you. I use on

[GENERAL] Mac OS X

2006-11-09 Thread Nathan Leon Pace, MD, MStat
I run an older version of psql (7.2.4) on a Linux machine.I wish to migrate psql to an Intel Mac running OS x 10.4.8.The supported platforms table in postgresql-8.1-US.pdf (page 259) lists Mac OS X with a PPC cpu as being supported, but not Mac OS X with a Intel cpu.Can psql run on an Intel Mac?Hav

[GENERAL] Datum problem

2006-11-09 Thread Enrico
Hi, I'm newbie of programming postgresql sever side, I write the function below and when I execute SELECT (anag_art, 150) AS esistenza from anag_art order by 1; result is something about this: | esistenza | ("(""002 "",""ARTICOLO PREZ. VEND. "",,PZ,32,1,20,""1

Re: [GENERAL] authentication question

2006-11-09 Thread Tom Lane
Craig White <[EMAIL PROTECTED]> writes: > I haven't had to fool too much with pam for authenticating other > services so I'm a little bit out of my knowledge base but I know that it > was simple to add netatalk into the pam authentication and expected that > postgresql would be similar. FWIW, we s

Re: [GENERAL] authentication question

2006-11-09 Thread Craig White
On Thu, 2006-11-09 at 12:34 -0300, Alvaro Herrera wrote: > Craig White wrote: > > > logs say... > > Nov 8 20:18:26 srv1 postgresql: Starting postgresql service: succeeded > > Nov 8 20:18:39 srv1 postgres[21020]: PAM audit_open() failed: > > Permission denied > > Nov 8 20:18:39 srv1 postgres[21

Re: [GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Shoaib Mir
You might want to check the ip tables as well if they have the required entries or not.Thanks,---Shoaib MirEnterpriseDB (www.enterprisedb.com) On 11/9/06, Richard Huxton wrote: Luca Ferrari wrote:> Hi all,> after a crash of my machine I restarted the pgsql as usual, and I can

Re: [GENERAL] 8.1.2 postmaster died

2006-11-09 Thread Shoaib Mir
Look at the database server logs and see what actually was happening just before the server crashed... do you have the auto vacuuming running at backend? or was there some client making connection just when the server did crash? your db logs can actually help you here. Thank you,---Sho

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Andrus
> Why not just subtract/add 1, so that the check includes the boundary > dates? > > Like so; > select 1 where ('2006-10-31'::date -1, '-12-31'::date +1) OVERLAPS >('2006-10-16'::DATE -1, '2006-10-31':: DATE +1) Alban, thank you. I use only dates as OVERLAPS arguments. I changed all my

[GENERAL] ROWTYPE initialization question

2006-11-09 Thread Alban Hertroys
'lo list, I have a plpgsql SP where I loop through a cursor. I have an internal variable that keeps the previous row, so that I can compare it with the current row in the cursor. Like so; DECLARE current table%ROWTYPE; previous table%ROWTYPE; BEGIN LOOP FETCH tableCur INTO

Re: [GENERAL] authentication question

2006-11-09 Thread Alvaro Herrera
Craig White wrote: > logs say... > Nov 8 20:18:26 srv1 postgresql: Starting postgresql service: succeeded > Nov 8 20:18:39 srv1 postgres[21020]: PAM audit_open() failed: > Permission denied > Nov 8 20:18:39 srv1 postgres[21020]: [2-1] LOG: pam_authenticate > failed: System error > Nov 8 20:1

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Alban Hertroys
Andrus wrote: I have a number of select statements (in 8.1 and 8.2beta) which assume that overlaps returns true for those cases. Which the best way to fix them ? Should I use AND, OR and date comparison operators instead of OVERLAPS ? Why not just subtract/add 1, so that the check includes t

Re: [GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Tom Lane
Richard Huxton writes: > Luca Ferrari wrote: >> I've started the daemon as: >> postmaster -D /mnt/data/database & > Is that how you normally start your DB server? Ditto. But if you are using a stock postgresql.conf then in fact the postmaster will *not* be listening to TCP with that command lin

Re: [GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Luca Ferrari
On Thursday 09 November 2006 15:57 Jeremiasz Miedzinski's cat, walking on the keyboard, wrote: > Have You checked network interfaces on your machine ? Maybe some of them > doesn't start-up properly... Interfaces are ok, and in fact other services on such interface are running correctly. Luca

Re: [GENERAL] 8.1.2 postmaster died

2006-11-09 Thread Martijn van Oosterhout
On Thu, Nov 09, 2006 at 11:52:48AM +0500, Shoaib Mir wrote: > Have a look at "16.4.3. Linux Memory Overcommit" on > http://www.postgresql.org/docs/8.1/interactive/kernel-resources.html If you look at the beginning of the thread you'dve seen we're talking about HPUX here... Maybe they have an OOM

Re: [GENERAL] Table design - unknown number of column

2006-11-09 Thread Merlin Moncure
On 11/9/06, Richard Ollier <[EMAIL PROTECTED]> wrote: Hello, For a project I have a table containing products and flags. The columns of this table are of 2 kinds : - Not null data (id, column1, column2) - Flags (100 different flags set to 1 or 0) Over the time the number of flag will increase f

Re: [GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Richard Huxton
Luca Ferrari wrote: Hi all, after a crash of my machine I restarted the pgsql as usual, and I can connect from the machine itself, but no more from a remote host. I checked the pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot connect to the host. Nmapping my host I cannot

Re: [GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Jeremiasz Miedzinski
2006/11/9, Luca Ferrari <[EMAIL PROTECTED]>: Hi all,after a crash of my machine I restarted the pgsql as usual, and I can connectfrom the machine itself, but no more from a remote host. I checked thepg_hba.conf file and it's ok, but either from psql or pgadmin I cannot connect to the host. Nmapping

Re: [GENERAL] [PL/pgSQL] Commit every N rows. Is it possible ?

2006-11-09 Thread Richard Huxton
Jeremiasz Miedzinski wrote: I'm digging into postgresql documentation but maybe I'm just not smart enough to understand the way which transactions are being processed into pgSQL. Is it possible to port above code to PL/pgSQL ? All functions, including pl/pgsql functions take place within a tra

[GENERAL] [PL/pgSQL] Commit every N rows. Is it possible ?

2006-11-09 Thread Jeremiasz Miedzinski
Hello,I'm still trying to convert my PL/SQL stored procedures into PL/pgSQL. Now, I have problem with commiting transaction every N rows: loopfetch csr_ac into row_id;   if not FOUND then  exit;   end if;   counter := counter + 1;   delete from spm_audit where adt_id=row_id;   delete from spm_a

Re: [GENERAL] posgres headers

2006-11-09 Thread Adrian Klaver
On Thursday 09 November 2006 06:33 am, Antonios Katsikadamos wrote: > Hi all. Sorry to bother. Does anyone know where the postgres headers are > stored? Which files constitute postgres headers? > > kind regards, > > Antonios > > - > Access over 1 million songs - Ya

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Tom Lane
Alban Hertroys <[EMAIL PROTECTED]> writes: > They're adjacent, they don't overlap. Check the documentation on > OVERLAPS, I'm sure it's explicit about whether it is inclusive or > exclusive (the latter apparently). It's not very clear, but the spec defines (S1,T1) OVERLAPS (S2,T2) as

[GENERAL] posgres headers

2006-11-09 Thread Antonios Katsikadamos
Hi all. Sorry to bother. Does anyone know where the postgres headers are stored? Which files constitute postgres headers? kind regards, Antonios Access over 1 million songs - Yahoo! Music Unlimited.

[GENERAL] cannot connect anymore from a remote host

2006-11-09 Thread Luca Ferrari
Hi all, after a crash of my machine I restarted the pgsql as usual, and I can connect from the machine itself, but no more from a remote host. I checked the pg_hba.conf file and it's ok, but either from psql or pgadmin I cannot connect to the host. Nmapping my host I cannot see the daemon listen

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread William Leite Araújo
2006/11/9, Andrus <[EMAIL PROTECTED]>: > They're adjacent, they don't overlap. Check the documentation on OVERLAPS,> I'm sure it's explicit about whether it is inclusive or exclusive (the> latter apparently).8.2 doc does not explain term overlap. It only says: "This _expression_ yields true when tw

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Andrus
> They're adjacent, they don't overlap. Check the documentation on OVERLAPS, > I'm sure it's explicit about whether it is inclusive or exclusive (the > latter apparently). 8.2 doc does not explain term overlap. It only says: "This expression yields true when two time periods (defined by their

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Andrus
I have a number of select statements (in 8.1 and 8.2beta) which assume that overlaps returns true for those cases. Which the best way to fix them ? Should I use AND, OR and date comparison operators instead of OVERLAPS ? Andrus. ---(end of broadcast)-

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread A. Kretschmer
am Thu, dem 09.11.2006, um 15:46:50 +0200 mailte Andrus folgendes: > set datestyle to iso,iso; > > select 1 where ('2006-10-31'::date, '-12-31'::date) OVERLAPS >('2006-10-16'::DATE, '2006-10-31':: DATE) > > > does not return any rows. > > Why ? > How to make overlaps to return correct

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Alban Hertroys
Andrus wrote: set datestyle to iso,iso; select 1 where ('2006-10-31'::date, '-12-31'::date) OVERLAPS ('2006-10-16'::DATE, '2006-10-31':: DATE) does not return any rows. Why ? They're adjacent, they don't overlap. Check the documentation on OVERLAPS, I'm sure it's explicit about whet

[GENERAL] database dump then restore on another system?

2006-11-09 Thread Rick Schumeyer
To date I have always used pg on a system where I had pg superuser status. I'm trying to move a database from such a system to one where I am just a user, and I'm having a couple of problems. The first is, the output of pg_dump has a lot of lines like: ALTER FUNCTION some_function OWNER TO ric

Re: [GENERAL] Why overlaps is not working

2006-11-09 Thread Matthias . Pitzl
Hm, why not this one: select ('2006-10-31'::date, '-12-31'::date) OVERLAPS ('2006-10-16'::DATE, '2006-10-31':: DATE); overlaps -- f (1 row) Greetings, Matthias > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andrus > Sent: Thursday,

[GENERAL] Why overlaps is not working

2006-11-09 Thread Andrus
set datestyle to iso,iso; select 1 where ('2006-10-31'::date, '-12-31'::date) OVERLAPS ('2006-10-16'::DATE, '2006-10-31':: DATE) does not return any rows. Why ? How to make overlaps to return correct result? Andrus. ---(end of broadcast)---

Re: [GENERAL] Table design - unknown number of column

2006-11-09 Thread Leif B. Kristensen
On Thursday 9. November 2006 09:34, Richard Ollier wrote: >Hello, > >For a project I have a table containing products and flags. >The columns of this table are of 2 kinds : >- Not null data (id, column1, column2) >- Flags (100 different flags set to 1 or 0) > >Over the time the number of flag will

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Alvaro Herrera
Anton Melser wrote: > Hi, > I just can't understand why autovacuum is not working. I have a test > db/table which I insert values into (by the thousands) and can't work > out why my stats don't get updated. Could someone have a quick look at > my attached .conf and tell me what I am doing? > I am r

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index)

2006-11-09 Thread Richard Huxton
Thomas H. wrote: OK - in that case try explicit subqueries: SELECT ... FROM (SELECT * FROM shop.dvds LEFT JOIN shop.oldtables.movies WHERE lower(mov_name) LIKE ... ) AS bar LEFT JOIN shop.data_soundmedia same result, have tried this as well (22sec). it's the LEFT JOIN shop.data_soundmedia

Re: [GENERAL] Table design - unknown number of column

2006-11-09 Thread Sean Davis
I think the typical way of attacking a problem would be a second and third table. The second table would look like: flat_type table flag_type_id flag_type (like the column name in your original table) flag_type_description (BONUS: you can describe each flag) product_flag table product_

Re: [GENERAL] converting Informix outer to Postgres

2006-11-09 Thread Harco de Hilster
I am not familiar with Informix but: - is OUTER() a LEFT or FULL outer join? - it is important where you put your join condition in Postgres wrt NULL insertions of OUTER joins E.g. Tables A(k,a) with (k1,a1), (k2, a2) records and table B(k,b) with (k1, b1) will result in: A LEFT OUTER JOIN B

  1   2   >