Re: [GENERAL] IN clause performance

2007-07-19 Thread Peter Wiersig
On Thu, Jul 19, 2007 at 05:52:30AM -0700, Paul Codler wrote: > Basic query optimization question- does Postgres process > >x IN (y1, y2) > as fast as >(x = y1 OR x = y2) > > in a function? EXPLAIN indicates this. Peter ---(end of broadcast)---

Re: [GENERAL] Strange round behaviour w/ more than 2 decimals

2007-07-11 Thread Peter Wiersig
On Wed, Jul 11, 2007 at 09:50:25AM -0300, Fernando Madruga Pinheiro wrote: > Hi. I'm having some strange round behaviour when using 4 decimals. > > If I use ROUND(1.8947, 2), it should return 1.90, but it does return 1.89. I asked my math teacher a similar question back in 7th grade: If you ro

Re: [GENERAL] how to: psql -U user --password password ?

2007-07-03 Thread Peter Wiersig
On Tue, Jul 03, 2007 at 02:47:58PM +0200, Stefan Zweig wrote: > > i appreciate any help. man psql: It is also convenient to have a ~/.pgpass file to avoid regularly having to type in passwords. See the documentation for more information. Peter ---(end of broa

Re: [GENERAL] redhat debug info

2007-03-27 Thread Peter Wiersig
On Tue, Mar 27, 2007 at 03:57:49PM -0400, Joseph S wrote: > Does anyone know how this works and how I can get those files > from the pg tarball? My guess: strip -o Peter ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore

Re: [GENERAL] Strange startup error

2006-03-17 Thread Peter Wiersig
On Fri, Mar 17, 2006 at 03:05:17PM -0500, Andrew Stewart wrote: > I have had postgres working perfectly up until recently. Now suddenly I > get an error when trying to run postgres: > > % psql > psql: FATAL: No pg_hba.conf entry for host localhost, user postgres, > database postgres > > % pos

Re: [GENERAL] beginne' - inserting a record

2005-12-03 Thread Peter Wiersig
On Sat, Dec 03, 2005 at 09:48:42PM +0100, Andrew Toth wrote: > > MediaBin=# insert into media values ("000", 120, "1"); > ERROR: column "000" does not exist > > What the Hell could be wrong? Your quotes. Use ' and that command will work. Peter ---(end of broadcast

Re: [GENERAL] copy data from utf16 csv file

2005-10-27 Thread Peter Wiersig
On Thu, Oct 27, 2005 at 03:30:43PM -0700, Shane wrote: > > Can anyone suggest how I can either get these into PG directly > or massage the file so as to be compatable? To my knowledge the only Unicode encoding used by Postgres is utf-8. Try 'recode' or 'iconv' on unix-like systems. A better text

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread Peter Wiersig
On Wed, Oct 26, 2005 at 02:52:36PM +0200, Zlatko Matić wrote: > > Is there any way to check the version of PostgreSQL by a query? > Maybe by querying catalog tables? Easier: select version(); Peter ---(end of broadcast)--- TIP 2: Don't 'kill -9' t

Re: [GENERAL] Installation Problem

2005-10-25 Thread Peter Wiersig
On Mon, Oct 24, 2005 at 08:59:17PM -0400, phil campaigne wrote: > Hi All, > I'm trying ot install postgresql 8.0.4 on suse 9.0. > > I can run ./configure but when I try to run make, the program cannot > find a usable c compiler. > I tried > ./configure CC=/usr/lib/gcc-lib/i586-suse-linux/3.3.3/cc

Re: [GENERAL] postgresql and C++/C

2005-09-28 Thread Peter Wiersig
On Wed, Sep 28, 2005 at 10:11:45AM +0100, [EMAIL PROTECTED] wrote: > > vicbsd# gcc -I Don't use gcc to compile C++. Use g++. Peter ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/

Re: [GENERAL] SQL command to dump the contents of table failed: PQendcopy()

2005-09-26 Thread Peter Wiersig
On Mon, Sep 26, 2005 at 07:03:06PM +0200, ruben wrote: > > I guess I'm doing something wrong: > > -bash-2.05b$ ulimit > unlimited Please read manpages, in this case bash: ulimit -a Peter ---(end of broadcast)--- TIP 9: In versions below 8.0, the

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-28 Thread Peter Wiersig
On Thu, Jul 28, 2005 at 08:31:21PM +0100, Phil Endecott wrote: > > This is Linux 2.4.26 and an ext3 filesystem. With the dir_index feature or without? Peter ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Peter Wiersig
On Wed, Apr 27, 2005 at 03:03:50PM -0400, Doug McNaught wrote: > > What I have done is to create a separate init.d script that > removes the PID file, and arrange for it to run before the PG > startup script. An even better place (if you really want to do all this) would be something that happens

Re: [GENERAL] Had a problem with pg_clog

2005-04-27 Thread Peter Wiersig
On Sun, Apr 24, 2005 at 11:52:11AM -0400, Tom Lane wrote: > Peter Wiersig <[EMAIL PROTECTED]> writes: > > On Sat, Apr 23, 2005 at 08:19:31PM -0400, Tom Lane wrote: > >> Peter Wiersig <[EMAIL PROTECTED]> writes: > >>> vacuumdb -z miwabar > >>> P

Re: [GENERAL] Had a problem with pg_clog

2005-04-24 Thread Peter Wiersig
On Sat, Apr 23, 2005 at 08:19:31PM -0400, Tom Lane wrote: > Peter Wiersig <[EMAIL PROTECTED]> writes: > > vacuumdb -z miwabar > > PANIC: open of /var/lib/pgsql/data/pg_clog/ failed: > >Keine Berechtigung > > server closed the con

[GENERAL] Had a problem with pg_clog

2005-04-21 Thread Peter Wiersig
Hi List, I had a database with a 8 Mb pg_dump file with 1.7 Gb in PG_DATA. I dropped the database and tried to recreate the db with this step: psql template1 < data.sql All tables and all data was restored and to help accessing the db I tried to vacuum analyze it, yielding this error message: