Re: [GENERAL] ERROR: invalid restriction selectivity: 224359728.000000

2007-11-22 Thread Tom Lane
[EMAIL PROTECTED] writes: > error message in log: > ERROR: invalid restriction selectivity: 0.49 [ blink... ] Surely it didn't really say that, because a moment's glance at the code shows that it's impossible: if (result < 0.0 || result > 1.0) elog(ERROR, "invalid re

[GENERAL] Requesting for a pgadmin3-1.8.0 RPM for SL4

2007-11-22 Thread Kandy Wong
Hi, I couldn't build the pgadmin3-1.8.0 from source on SL4. Is there any pgadmin3 verion 1.8.0 RPMs available for SL4 or RHEL4? I've found a link for a beta3 version: http://www.postgresql.org/ftp/pgadmin3/release/v1.8.0-beta3/rhel-4/rpms/ But the contents are no longer existed. Kandy -

Re: [GENERAL] select with recursive support

2007-11-22 Thread Sascha Bohnenkamp
> What is intended for PostgreSQL is decidedly NOT the "Oracle syntax" no problem for me > There have been a couple of abortive starts to this; I seem to recall > someone having offered to work on it in the 8.4 branch. that was what I want to say, at least there exists a (non free) working solutio

Re: [GENERAL] Primary Key

2007-11-22 Thread Sascha Bohnenkamp
> Fie on you evil synthetic key lovers. Long live the Natural Key! think of an foreign key referencing a primary key with 6 columns *urgs* never! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate s

Re: [GENERAL] Restart a sequence regularly

2007-11-22 Thread Marco Colombo
Scott Marlowe wrote: > revoke all privs on the sequence to anyone but the user about to reset it > reset it > grant the options back Quoting the OP: > That means, when others want to access the sequence between > 31-Dec 23:59:55 and 1-Jan 00:00:05, they are waiting instead of > getting an error.

Re: [GENERAL] ERROR: invalid restriction selectivity: 224359728.000000

2007-11-22 Thread xeb
> On Nov 16, 2007 11:59 AM, <[EMAIL PROTECTED]> wrote: > > Hello! > > Process postmaster completly eat my proccessor for a long time and i see > > that message in logs. > > Does anybody know what does the subj means and why it occures ? > > You're giving us WAY too little information to troublesho

Re: [GENERAL] select with recursive support

2007-11-22 Thread Sascha Bohnenkamp
> I saw on the todo list that the "with recursive" option for selects > (equivalent to oracle's connect by, as far as I know) is on the todo > list for postgresql, but apparently not for the upcoming 8.3 release. the postgresql derivate enterprisedb has this feature (exactly the oracle syntax) ---

[GENERAL] Unused item pointers - can someone explain?

2007-11-22 Thread Elmer
Hello, I vacuumed one of my database tables. In vacuum output I saw the following information about unused item pointers: There were 19310 unused item pointers. As I understand It means that my table's file consists 19310 free tuple pointers. After some minutes I run vacuum again. It was quite

Re: [GENERAL] Dynamic expressions set in "order by" clause

2007-11-22 Thread Vyacheslav Kalinin
You could write a set of expressions that yield proper order by field in one case and say null in another. Say we want order by columns if the first function argument is '1' and by if it is '2', this can be achieved as: select col1, col2, col3 from mytable where ... order by case when $1 = '1'

Re: [GENERAL] Read-only availability of a standby server?

2007-11-22 Thread Martin Gainty
Could you explain what hot-standby characteristic is most important?If you desire to replicate your Write-ahead log take a look at Point In Time Recovery http://www.postgresql.org/docs/8.1/static/backup-online.html If you desire to use separate physical machines with ability to replicate sch

[GENERAL] which psqlodbc driver to use for PostgreSQL 8.2.5

2007-11-22 Thread Kandy Wong
Hi, I've installed PostgreSQL 8.2.5 on SL4 using RHEL4 RPMs but there is no psqlodbc RPM included. So I'd like to know which version of psqlodbc should I use for PostgreSQL8.2.5 and is there any RPM available for SL4 or RHEL 4? Thank you very much. Kandy ---(end of

Re: [GENERAL] Query re disk usage

2007-11-22 Thread Paul Lambert
Magnus Hagander wrote: On Thu, 2007-11-22 at 17:04 +0900, Paul Lambert wrote: OK, W2K3 supports a thing it calls Junctions, which are similar to symlinks - and PG appears to be using that in this case. Crisis averted. I was just going to suggest that. It's a pretty neat feature, but the supp

Re: [GENERAL] Date Timezone

2007-11-22 Thread Andrew Maclean
Thankyou very much. You have fixed my synax issues! It is much appreciated. Andrew On Nov 23, 2007 8:51 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Andrew Maclean wrote: > > This extracts the time zone in seconds, but how do I add it to the > datetime > > that I have? > > > > This is wha

Re: [GENERAL] Date Timezone

2007-11-22 Thread Alvaro Herrera
Andrew Maclean wrote: > This extracts the time zone in seconds, but how do I add it to the datetime > that I have? > > This is what I have been trying but it doesn't work: > '2007-12-3'::timestamp + interval 'extract(timezone from now()) seconds' '2007-12-3'::timestamp + extract(timezone from now

Re: [GENERAL] Date Timezone

2007-11-22 Thread Scott Marlowe
On Nov 22, 2007 3:16 PM, Andrew Maclean <[EMAIL PROTECTED]> wrote: > I have a problem in that dates are stored as UTC in my dataase. I.e. without > timezone. > > What I want to do: is to get this date from the server and add the server's > current time zone to it. Then I will present a list of date

Re: [GENERAL] Date Timezone

2007-11-22 Thread Alvaro Herrera
Andrew Maclean wrote: > I have a problem in that dates are stored as UTC in my dataase. I.e. without > timezone. > > What I want to do: is to get this date from the server and add the server's > current time zone to it. Then I will present a list of dates and times to > the user in their time-zone

[GENERAL] Date Timezone

2007-11-22 Thread Andrew Maclean
I have a problem in that dates are stored as UTC in my dataase. I.e. without timezone. What I want to do: is to get this date from the server and add the server's current time zone to it. Then I will present a list of dates and times to the user in their time-zone. How can I do this? I have been

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-22 Thread Owen Hartnett
At 3:30 PM -0800 11/21/07, Selena Deckelmann wrote: Hello, I have been looking into getting some woman-sized PostgreSQL shirts, in addition to the more typical men-sized tshirts. The particular style is American Apparel shirts, style # 2102. They are "normal looking" t-shirts, just proportioned

Re: [GENERAL] Query re disk usage

2007-11-22 Thread Magnus Hagander
On Thu, 2007-11-22 at 17:04 +0900, Paul Lambert wrote: > Paul Lambert wrote: > > I've just noticed in the tablespace documentation (Ch 19.6) that PG > > makes use of symbolic links that point to any user-defined tablespaces > > but AFAIK W2K3 doesn't support symlinks. > > > > OK, W2K3 supports

Re: [GENERAL] Dynamic expressions set in "order by" clause

2007-11-22 Thread Sergey Konoplev
> Not that I've ever heard of. Well, you move the procedure up into > the application level but inside the database you'll need a procedure > to handle the branching on the argument values with each branch The thing is that it's internal query and its result isn't retuned from the procedure. > Y

Re: [GENERAL] Casting hexadecimal IPs to readable content

2007-11-22 Thread Harald Armin Massa
Jean-Michel, to be sure the documentation of that storage would be needed. But my educated guess is: select get_byte(decode(substring('52e1fcb6',1,2),'hex'),0)||'.'|| get_byte(decode(substring('52e1fcb6',3,2),'hex'),0)||'.'|| get_byte(decode(substring('52e1fcb6',5,2),'hex'),0)||'.'|| get_byte(dec

[GENERAL] Casting hexadecimal IPs to readable content

2007-11-22 Thread Jean-Michel Pouré
Dear Friends, My PhpBB forum with 4000 users was hacked in Switzerland. Enquirers (not my own idea) proposed that I look for certain IPs in my PostgreSQL 8.2 database. The problem is that PhpBB stored IPs as strings, which seem to be more or less encoded. In PhpBB, IPs are stored as Hexa: "54dc0

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Alvaro Herrera
Abraham, Danny wrote: > Is there a way to break the PGresult array to chunks > Like Oracle? Sure. Use a cursor. -- Alvaro Herrera http://www.PlanetPostgreSQL.org/ "Right now the sectors on the hard disk run clockwise, but I heard a rumor that you can squeeze 0.2% m

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Gregory Stark
"Abraham, Danny" <[EMAIL PROTECTED]> writes: > Is there a way to break the PGresult array to chunks > Like Oracle? There isn't a protocol-level way but there is a way in SQL, use cursors and "FETCH FORWARD " -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about E

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Reg Me Please
Il Thursday 22 November 2007 16:23:25 Abraham, Danny ha scritto: > Is there a way to break the PGresult array to chunks > Like Oracle? > > Thanks > > Danny Abraham > BMC Software > CTM&D Business Unit > 972-52-4286-513 > [EMAIL PROTECTED] > > > ---(end of broadcast)-

[GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Abraham, Danny
Is there a way to break the PGresult array to chunks Like Oracle? Thanks Danny Abraham BMC Software CTM&D Business Unit 972-52-4286-513 [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Andrew Sullivan
On Thu, Nov 22, 2007 at 09:14:13AM -0500, Martin Gainty wrote: > > Good Morning AndrewI noticed the Vixie cron responds to SIGHUP signalsDo > you have any suggestions or tutorials on how Postgres would feed these > event signals to Vixie cron? Why would Postgres have to tell crond to restart? A

Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Sorin N. Ciolofan
Thank you all, Yes, I used the absolute path in my script and now works ok :-) Thank you again Sorin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Frank Wittig Sent: Thursday, November 22, 2007 4:01 PM To: Sorin N. Ciolofan Cc: [EMAIL PROTECTED]; pgsql

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread Andrew Sullivan
On Thu, Nov 22, 2007 at 02:43:02PM +0100, [EMAIL PROTECTED] wrote: > Yes, there is a different connection for each thread :-( So do you have some autocommit setting incorrect? A -- Andrew Sullivan Old sigs will return after re-constitution of blue smoke ---(end of broad

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Andrew Sullivan
On Thu, Nov 22, 2007 at 02:59:33PM +0100, Marco Bizzarri wrote: > Andrew, can you confirm the previous statement? I'm checking on a Debian > Linux, > at it seems to be a Vixie Cron, and that feature is described in the man > page... If the feature's in your man page, then it works on your system

Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Frank Wittig
Hello Sorin! Sorin N. Ciolofan wrote: > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.out You should output STDERR to some error logfile or set MAILTO in your crontab. I guess you then would have seen an error mes

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Marco Bizzarri
On Nov 22, 2007 2:53 PM, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > On Thu, Nov 22, 2007 at 02:28:08PM +0100, Marco Bizzarri wrote: > > > > why don't you add a "MAILTO=" at the start of your > > crontab file, so that you can receive a report of the problem? > > Note: check that your cron accepts

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Andrew Sullivan
On Thu, Nov 22, 2007 at 02:28:08PM +0100, Marco Bizzarri wrote: > > why don't you add a "MAILTO=" at the start of your > crontab file, so that you can receive a report of the problem? Note: check that your cron accepts such an addition. Many systems now use Vixie's cron, which does accept that,

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Marco Bizzarri
On Nov 22, 2007 2:46 PM, Sorin N. Ciolofan <[EMAIL PROTECTED]> wrote: > Hi Marco! > > Thank you for the advice. > > I got: > > /home/swkm/services/test/backup.sh: line 4: pg_dump: command not found > updating: mydb_dump_22-11-07.out (stored 0%) > > which seems strange > > Try putting the full path

Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread jef . peeraer
On Thu, 22 Nov 2007, Sorin N. Ciolofan wrote: > Hello all! > > I've a small bash script backup.sh for creating dumps on my Postgre db: > > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.out > > I've edited cron

Re: [GENERAL] [SQL] Bad Schema Design or Useful Trick?

2007-11-22 Thread Richard Huxton
Richard Broersma Jr wrote: Below I've included sample table definitions for a vertically partitioned disjunctive table hierarchy. I wanted to point out the use of the composite primary key declaration that is applied to two columns that are clearly not a candidate key. However, using the badly

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Sorin N. Ciolofan
Hi Marco! Thank you for the advice. I got: /home/swkm/services/test/backup.sh: line 4: pg_dump: command not found updating: mydb_dump_22-11-07.out (stored 0%) which seems strange -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marco Bizzarri Sent: Th

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread luca . ciciriello
Sponsor: In REGALO 'All the Good Thing' di NELLY FURTADO Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6616&d=20071122 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread Francesco Esposito
: > Prova 1bitmore Newsletter il servizio per creare newsletter in modo > semplice e veloce, senza bisogno di conoscenze di grafica o di > programmazione. > Gratis per 30 giorni! > > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7243&d=20071122 > > > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > >http://archives.postgresql.org/ >

Re: [GENERAL] [ADMIN] backup of postgres scheduled with cron

2007-11-22 Thread Marco Bizzarri
On Nov 22, 2007 2:19 PM, Sorin N. Ciolofan <[EMAIL PROTECTED]> wrote: > Hello all! > > I've a small bash script backup.sh for creating dumps on my Postgre db: > > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.o

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread Andrew Sullivan
On Thu, Nov 22, 2007 at 02:10:49PM +0100, [EMAIL PROTECTED] wrote: > I've sperimented a strange behaviour using the command BEGIN and COMMIT in a > multi-threaded Linux environment. > In one of the two thread I use I've got the following message after > PQexec(myconn, "BEGIN;"); Uh, are your two

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread Martijn van Oosterhout
On Thu, Nov 22, 2007 at 02:10:49PM +0100, [EMAIL PROTECTED] wrote: > Hi All. > I've sperimented a strange behaviour using the command BEGIN and COMMIT in a > multi-threaded Linux environment. > In one of the two thread I use I've got the following message after > PQexec(myconn, "BEGIN;"); You do

[GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Sorin N. Ciolofan
Hello all! I've a small bash script backup.sh for creating dumps on my Postgre db: #!/bin/bash time=`date '+%d'-'%m'-'%y'` cd /home/swkm/services/test pg_dump mydb > mydb_dump_$time.out I've edited crontab and added a line: 00 4 * * * swkm /home/swkm/services/test

[GENERAL] BEGIN strange behaviour

2007-11-22 Thread luca . ciciriello
vizio per creare newsletter in modo semplice e veloce, senza bisogno di conoscenze di grafica o di programmazione. Gratis per 30 giorni! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7243&d=20071122 ---(end of broadcast)--- TIP

Re: [GENERAL] Postgres table size

2007-11-22 Thread Martijn van Oosterhout
On Wed, Nov 21, 2007 at 09:51:22AM -0800, SHARMILA JOTHIRAJAH wrote: > Thanks for the detailed explanation Tom. You are rigt...The number of pages > for this tables as per pg_class is 189. > > I have a few questions > 1. How do you find the MAXALIGN of the machine? And what is that used for? MA

Re: [GENERAL] EAV or not to EAV?

2007-11-22 Thread Oleg Bartunov
On Thu, 22 Nov 2007, Reg Me Please wrote: Hi all. I have to take into account the update history of every single field into a number of tables. Those updates can come to the future (next values) but also to the past (history fix) and apply only to some fields, usually not to the entire record.

Re: [GENERAL] Restart a sequence regularly

2007-11-22 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Richard Huxton <[EMAIL PROTECTED]> writes: > Kathy Lo wrote: >> On 11/21/07, Richard Huxton <[EMAIL PROTECTED]> wrote: >>> You probably shouldn't attach any meaning to the numbers from a sequence >>> - they're just guaranteed to be unique, nothing else. > What you

Re: [GENERAL] Read-only availability of a standby server?

2007-11-22 Thread Simon Riggs
On Thu, 2007-11-22 at 09:14 +0100, Ottavio Campana wrote: > Stefan Kaltenbrunner ha scritto: > > Garber, Mikhail wrote: > >> In the high-availabilty situation with a warm standby, is it possible (or > >> planned) to be able to make standby readable? > >> This is a new feature in Oracle 11 and it i

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-22 Thread Devrim GÜNDÜZ
Hi, On Thu, 2007-11-22 at 01:34 -0600, Scott Marlowe wrote: > Just adding one more request for the polo shirt. L or XL if they run > small. + some XXL please. :) -- Devrim GÜNDÜZ , RHCE PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated H

[GENERAL] EAV or not to EAV?

2007-11-22 Thread Reg Me Please
Hi all. I have to take into account the update history of every single field into a number of tables. Those updates can come to the future (next values) but also to the past (history fix) and apply only to some fields, usually not to the entire record. Every lookup in those tables is always relate

Re: [GENERAL] Read-only availability of a standby server?

2007-11-22 Thread Ottavio Campana
Stefan Kaltenbrunner ha scritto: > Garber, Mikhail wrote: >> In the high-availabilty situation with a warm standby, is it possible (or >> planned) to be able to make standby readable? >> This is a new feature in Oracle 11 and it is very important for a project I >> am working on. > > yeah there

Re: [GENERAL] Query re disk usage

2007-11-22 Thread Paul Lambert
Paul Lambert wrote: I've just noticed in the tablespace documentation (Ch 19.6) that PG makes use of symbolic links that point to any user-defined tablespaces but AFAIK W2K3 doesn't support symlinks. OK, W2K3 supports a thing it calls Junctions, which are similar to symlinks - and PG appear