[GENERAL] syntax error in "createdb"

2007-05-07 Thread kannan kk
hello when i try to execute createdb,psql,pg_dump,pg_restore and similar postgre commands , i get syntax at or near 'createdb' and similar to other statements. plz help me wht would be the problem. - Office firewalls, cyber cafes, college lab

Re: [GENERAL] syntax error in "createdb"

2007-05-07 Thread Joris Dobbelsteen
Please state * Which version of postgresql are you using? * Which exact commands are you executing? * What are the exact error messages? Please be more precise. Your question is, I believe, too vague for the community to offer good help with your probl

Re: [GENERAL] [SQL] syntax error in "createdb"

2007-05-07 Thread Phillip Smith
Where are you trying to execute these commands? They should be run at the command line as they are 'standalone' programs, not SQL commands to be run in an SQL session. On Mon, 2007-05-07 at 10:01 +0100, kannan kk wrote: > hello > > when i try to execute createdb,psql,pg_dump,pg_restore and simil

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Prashant Ranjalkar
Hello, The previously running postmaster process might not closed properly and released the kernel's memory. Check for any process running on the server if it exists then kill the process.here due to unrelease of kernel's memory and while booting the process is not releasing shared memory hence l

Re: [GENERAL] Postgres 8.3-dev

2007-05-07 Thread Prashant Ranjalkar
Hello, Remove Postgres directory from the your drive and also entries from Registry. Reboot and try regards Prashant Ranjalkar On 5/2/07, Paolo Saudin <[EMAIL PROTECTED]> wrote: I am trying out postgresql-8.3-dev1 on Windows XP SP2 and during the installation, I get the following error durin

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Christopher S Martin
sysctl -a reveals the following: kern.sysv.shmmax: 12582912 kern.sysv.shmmin: 1 kern.sysv.shmmni: 32 kern.sysv.shmseg: 8 kern.sysv.shmall: 1024 kern.sysv.semmni: 87381 kern.sysv.semmns: 87381 kern.sysv.semmnu: 87381 kern.sysv.semmsl: 87381 kern.sysv.semume: 10 I am using the sysctl.conf file in /

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Prashant Ranjalkar
Hello, Please check any .pid file exist in your data directory. If it exists then postmaster is running and memory is not freed up. Also check ipcs -mp it will give any shared memory allocated segments if any and consuming the memory. regards Prashant Ranjalkar On 5/7/07, Christopher S Martin

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Christopher S Martin
No .pid files found in the data directory. The ipcs output doesn't list anything owned by the postgres user, or by root. Thanks, Chris On 5/7/07, Prashant Ranjalkar <[EMAIL PROTECTED]> wrote: Hello, Please check any .pid file exist in your data directory. If it exists then postmaster is runni

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Prashant Ranjalkar
Hi Chris, Please let me know your shared_buffers & max_connections . How much RAM your sstem has. You have set up your shmmax to 12MB. I hope these DB parameters have larger in values and stopping the allocating of shared memory segments during start up of the database. if your system has enough

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Christopher S Martin
The shared_buffers and max_connections values are both set to the default values (unchanged i the configuration file). For max_connections this is 50, and for the shared_buffers I believe the default is 32mb. Do you suggest setting the shmmax value to 32mb or greater? Thanks, Chris My developm

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Christopher S Martin
Just a note: Reducing the amount of default connections to 25 and increasing shmmax to 40 Mb did not fix the problem. Interestingly, changing the max_connections values to 25 was not reflected in the HINT output after postmaster failed to launch, it still reports max connections as 30. Thanks, C

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Isak Hansen
Bah, evil google interface. My reply was ment for the list. On 5/7/07, Isak Hansen <[EMAIL PROTECTED]> wrote: On 5/7/07, Christopher S Martin <[EMAIL PROTECTED]> wrote: > sysctl -a reveals the following: > kern.sysv.shmmax: 12582912 Maximum size of shared memory segment (afaik bytes - needs to

Re: [GENERAL] did not find any relation for existing table

2007-05-07 Thread Sinead O Brien
Please check the output of the below query. select tablename,schemaname from pg_tables where schemaname='history'; I assume that the table might have created under public schema. Please check the output of the above query and if the output consists of public in place of schemaname column th

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Jim Nasby
On May 7, 2007, at 6:19 AM, Christopher S Martin wrote: No .pid files found in the data directory. The ipcs output doesn't list anything owned by the postgres user, or by root. I'm guessing the issue here is shmall, which I believe is limiting you to 4MB of shared memory. Is there *anything

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Scott Ribe
When you increase shmmax, you need to increase shmall as well. Max is the largest single allocation allowed, in bytes. All is the total SysV shared memory available to all processes, in pages. (I think...) -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---

[GENERAL] Slow query and indexes...

2007-05-07 Thread Jonas Henriksen
Hi, I'm trying to figure out how to make postgres utilize my indexes on a table. this query: explain analyze SELECT max(date_time) FROM data_values; Goes fast and returns: QUERY PLAN ---

[GENERAL] linux bug and lost rows

2007-05-07 Thread Jaime Silvela
A long time ago I wrote to the list about a problem I was having with COPY losing rows from an import file: the number of imported rows was not equal to the number of rows in the file, and two consecutive imports from the same file would get different row counts. Several people tried to reprodu

[GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Jan Bilek
Hello, I would need more info about index types in postgre (btree, hash, gin and gist) - is there any guide that explains in detail when to use which index type? These index types have different performance with certain collumn types and data characteristics store in them. There's not much info

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Tom Lane
Jim Nasby <[EMAIL PROTECTED]> writes: > I'm guessing the issue here is shmall, which I believe is limiting > you to 4MB of shared memory. Is there *anything* using shared memory > in the ipcs report? Right, it looks like shmall is the problem. I believe BTW that you need to do "sudo ipcs -a"

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Peter Eisentraut
Am Montag, 7. Mai 2007 15:53 schrieb Jonas Henriksen: > while if I add a GROUP BY data_logger  the query uses a seq scan and a > > lot of time: > >> explain analyze SELECT max(date_time) FROM data_values GROUP BY > data_logger_id; I don't think there is anything you can do about this. -- Peter E

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Peter Eisentraut
Am Montag, 7. Mai 2007 16:09 schrieb Jan Bilek: > I would need more info about index types in postgre (btree, hash, gin and > gist) - is there any guide that explains in detail when to use which index > type? You use btree unless you have a specific, particular reason to use one of the other ones

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Jan Bilek
I was asking for these "specific/particular reasons". Im not the database developer, to be expert on indexes (i know whats btree and hash - gin and gist are rather mysterious for me). Ok - btree is fine, but sometimes could be better to use gist - my question is: when is that "sometimes"? Unless

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Pavel Stehule
Hello, I would need more info about index types in postgre (btree, hash, gin and gist) - is there any guide that explains in detail when to use which index type? These index types have different performance with certain collumn types and data characteristics store in them. There's not much info ab

Re: [GENERAL] shmget fails on OS X with proper settings

2007-05-07 Thread Jim Nasby
On May 7, 2007, at 9:11 AM, Tom Lane wrote: I believe BTW that you need to do "sudo ipcs -a" to be sure of seeing everything; otherwise OS X's ipcs silently doesn't tell you about segments your userid doesn't have access to. Actually, it seems that you don't get anything back when ipcs is ru

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Jim Nasby
On May 7, 2007, at 8:53 AM, Jonas Henriksen wrote: while if I add a GROUP BY data_logger the query uses a seq scan and a lot of time: explain analyze SELECT max(date_time) FROM data_values GROUP BY data_logger_id; What do you get if you run that with SET enable_seqscan = off; ? -- Jim Nasby

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Jim Nasby
On May 7, 2007, at 9:44 AM, Pavel Stehule wrote: Hello, I would need more info about index types in postgre (btree, hash, gin and gist) - is there any guide that explains in detail when to use which index type? These index types have different performance with certain collumn types and data

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Jonas Henriksen
Well thanks, but that don't help me much. I've tried setting an extra condition using datetime>(now() - '14 weeks'::interval) explain analyze SELECT max(date_time) FROM data_values where date_time > (now() - '14 weeks'::interval) GROUP BY data_logger_id; HashAggregate (cost=23264.52..23264.55

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Karsten Hilbert
On Mon, May 07, 2007 at 10:47:24AM -0500, Jim Nasby wrote: > GiST can also be useful if you have to query in multiple dimensions, > which can occur outside the normal case of geometry. Best example I > know of is a table containing duration information in the form of > start_time and end_tim

Re: [GENERAL] linux bug and lost rows

2007-05-07 Thread Tom Lane
Jaime Silvela <[EMAIL PROTECTED]> writes: > A long time ago I wrote to the list about a problem I was having with > COPY losing rows from an import file: the number of imported rows was > not equal to the number of rows in the file, and two consecutive imports > from the same file would get diff

Re: [GENERAL] query not using index

2007-05-07 Thread Greg Janée
Thanks, that was the problem: postgres thought it had to typecast the column to a box type, which prevented use of the index. For any PostGIS users reading this: the solution is to express the other operand using a GeometryFromText(...) construct. Thanks again, -Greg On May 5, 2007, at 7:4

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Tom Lane
"Jan Bilek" <[EMAIL PROTECTED]> writes: > Ok - btree is fine, but sometimes could be better to use gist - my question > is: when is that "sometimes"? Unless i know how to use the indexes, then > they are useless for me - am i right? gist and gin are for indexing queries that btree is not capable

[GENERAL] Date Math

2007-05-07 Thread Rich Shepard
I've read both Section 8.5 of the on-line 8.2.4 docs, and the pertinent sections of Douglas & Douglas, and I'm still not certain that I'm correctly expressing the query I want. Please correct as needed. From table (Permits) I want to identify those which expire within a specified time from to

Re: [GENERAL] Date Math

2007-05-07 Thread A. Kretschmer
am Mon, dem 07.05.2007, um 9:43:50 -0700 mailte Rich Shepard folgendes: > From table (Permits) I want to identify those which expire within a > specified time from today. For example: > > SELECT permit_nbr, title, date_issued, term, > process_time from Permits > WHERE

Re: [GENERAL] How to get comments for view columns?

2007-05-07 Thread eugene . mindrov
Tom Lane wrote: > What do you consider "selected"? Given a view defined as > > select a, b, c+d as sum from tab where e > 42; > > what output are you wishing for? > > AFAIR the dependency mechanism will treat a,b,c,d,e alike. To do more > you'd need to grovel through the pg_rewrite express

[GENERAL] Where to hook my custom access control module?

2007-05-07 Thread Karel Gardas
Hello, I'd like to look at a possibility of integrating OpenPMF (http://www.openpmf.org) with the PostgreSQL. There is a possibility to have a "weak" integration by using a provided rule system and SQL, but this way we would lose central management functionality of OpenPMF, especially its po

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-05-07 Thread syaskin
On Mar 9, 3:35 pm, [EMAIL PROTECTED] ("Brandon Aiken") wrote: > Why is running on PG so important? Why not look for the bestCRM > application for your user's needs? > > -- > Brandon Aiken > CS/IT Systems Engineer > > > > -Original Message- > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTE

Re: [GENERAL] tuple concurrently updated

2007-05-07 Thread Andrus
That's a bit interesting ... what PG version is this exactly? "PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" What else might be touching that table at the same time? Maybe some other client executes same or other command at same time in same dat

Re: [GENERAL] did not find any relation for existing table

2007-05-07 Thread Prashant Ranjalkar
Hello, Please check the output of the below query. select tablename,schemaname from pg_tables where schemaname='history'; I assume that the table might have created under public schema. Please check the output of the above query and if the output consists of public in place of schemaname column

Re: [GENERAL] Dangers of fsync = off

2007-05-07 Thread Joel Dice
Thanks for the explanation, Tom. I understand the problem now. My next question is this: what are the dangers of turning fsync off in the context of a high-availablilty cluster using asynchronous replication? In particular, we are using Slony-I and linux-ha to provide a two-node, master-slav

[GENERAL] Postgre Sql 7.3 connection problem

2007-05-07 Thread nij es
sir, I am using postgresql 7.3 in Redhat Linux.Windows XP is my client. I want to communicate pgsql without a specific ip rangeI.I want to accept all ip address in postgresql 7.3. How can i comunicate. Please help me to solve this problem. - Ahhh...imagini

[GENERAL] multi-language web application: is it possible?

2007-05-07 Thread Yilin Qiu
I have many tables like the table Person:below, in mysql database. person_id, first_name,last_name, mi, gb_first_name, gb_last_name, b5_first_name, b5_last_name, gender, dob where different columns storing strings in different encodings. At anytime, a web user can switch the language and the

[GENERAL] Large object and pg_restore problem

2007-05-07 Thread Gregory Gimenez
Dear All, We are using the postgreSQL version 8.0.7 and we are facing a problem regarding the large object and pg_dump. We are storing image data as OID type. We have developed a PHP application on it and we can see those images properly. The problem is when we dump the DB using the followi

Re: [GENERAL] Date Math

2007-05-07 Thread aklaver
-- Original message -- From: Rich Shepard <[EMAIL PROTECTED]> >I've read both Section 8.5 of the on-line 8.2.4 docs, and the pertinent > sections of Douglas & Douglas, and I'm still not certain that I'm correctly > expressing the query I want. Please correct as

[GENERAL] pg_ctl: could not start service "pgsql-8.2": error code 1063

2007-05-07 Thread Stefano T
Hi everybody. Well.. i've a probelm. pg doesn't start at boot. if i copy the string of command and try execute: C:\Programs\PostgreSQL\8.2\bin\pg_ctl.exe runservice -N "pgsql-8.2" -D "C:\Programs\PostgreSQL\8.2\data\" the output is: pg_ctl: could not start service "pgsql-8.2": error code 1063 and

[GENERAL] DataArchitect Version 4.0 now available

2007-05-07 Thread shawn
Rancho Santa Margarita, CA -- 1 May 2007 -- theKompany.com, producers and distributors of high-quality open source and commercial Linux software, are pleased to announce the release of DataArchitect 4.0. DataArchitect is a powerful tool that provides ERD capability like PowerDesigner as well as t

Re: [GENERAL] pg_ctl: could not start service "pgsql-8.2": error code 1063

2007-05-07 Thread Magnus Hagander
Stefano T wrote: > Hi everybody. > Well.. i've a probelm. pg doesn't start at boot. if i copy the string > of command and try execute: > > C:\Programs\PostgreSQL\8.2\bin\pg_ctl.exe runservice -N "pgsql-8.2" -D > "C:\Programs\PostgreSQL\8.2\data\" > the output is: > pg_ctl: could not start service

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, A. Kretschmer wrote: I think, you should cast your intervals, an example: select current_date + '10 months'::interval; Andreas, OK. I wasn't clear on this point. Thanks, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosyst

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, [EMAIL PROTECTED] wrote: test=> select '01/01/04'::date +interval '3 year',current_date + interval '2 month'; ?column? | ?column? -+- 2007-01-01 00:00:00 | 2007-07-07 00:00:00 (1 row) Adrian, I think so, but without

Re: [GENERAL] Postgre Sql 7.3 connection problem

2007-05-07 Thread Martin Gainty
try vi postgres_home/data/postgresql.conf #list comma delimited IP addresses for this server to listen on #listen on just localhost by uncommenting this line #listen_addresses = 'localhost' M-- This email message and any files transmitted with it contain confidential information intended only fo

Re: [GENERAL] Date Math

2007-05-07 Thread Adrian Klaver
-- Original message -- From: Rich Shepard <[EMAIL PROTECTED]> > On Mon, 7 May 2007, [EMAIL PROTECTED] wrote: > > > test=> select '01/01/04'::date +interval '3 year',current_date + interval > > '2 month'; > > ?column? | ?column? > >

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Adrian Klaver wrote: If term and process_time are stored as intervals then it will work. Also if they are stored as INTERVALS you can do CURRENT_DATE+process_time. In other words not have to declare the INTERVAL . Is date_issued stored as a date? If so it would not need to be

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Rich Shepard wrote: term SMALLINT DEFAULT 1 NOT NULL, -- in years processing_time DEFAULT 180 NOT NULL SMALLINT, -- in days I can change from SMALLINT to INT4 if that helps clarify the values as INTERVALs. Rich -- Richard B. Shepard, Ph.D.

Re: [GENERAL] Large object and pg_restore problem

2007-05-07 Thread Tom Lane
Gregory Gimenez <[EMAIL PROTECTED]> writes: > So, we try to get rid of this particular image by first deleting the > picture row with this corresponding oid and then making a vaccumdb + > reindex to delete the reference in the pg_largeoject but still the > largeobject is there. Well, yeah, you

Re: [GENERAL] Postgre Sql 7.3 connection problem

2007-05-07 Thread A. Kretschmer
am Mon, dem 07.05.2007, um 0:39:43 -0700 mailte nij es folgendes: > sir, > > I am using postgresql 7.3 in Redhat Linux.Windows XP is my client. I want to > communicate pgsql without a specific ip rangeI.I want to accept all ip address > in postgresql 7.3. How can i comunicate. Please help me to

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-05-07 Thread Frank Finner
You mention Compier not running on PG. Did you look ad ADempiere (http://www.adempiere.com/)? Its a fork of Compiere which claims to run especially with PG (though I did not yet have the time to test it). Regards, Frank. On 4 May 2007 20:07:17 -0700 syaskin <[EMAIL PROTECTED]> thought long, th

Re: [GENERAL] linux bug and lost rows

2007-05-07 Thread Jaime Silvela
Tom Lane wrote: Jaime Silvela <[EMAIL PROTECTED]> writes: A long time ago I wrote to the list about a problem I was having with COPY losing rows from an import file: the number of imported rows was not equal to the number of rows in the file, and two consecutive imports from the same file

Re: [GENERAL] Date Math

2007-05-07 Thread Adrian Klaver
On Monday 07 May 2007 10:56 am, Rich Shepard wrote: > On Mon, 7 May 2007, Adrian Klaver wrote: > > If term and process_time are stored as intervals then it will work. Also > > if they are stored as INTERVALS you can do CURRENT_DATE+process_time. In > > other words not have to declare the INTERVAL .

[GENERAL] PITR and tar

2007-05-07 Thread Jeff Davis
The docs recommend using tar to perform a base backup for PITR. Usually, tar reports notices like: "tar: Truncated write; file may have grown while being archived." First of all, is the tar archive still safe if those errors occur? Second, it seems that it can cause a bad backup to occur if you

Re: [GENERAL] Date Math

2007-05-07 Thread Tom Lane
Adrian Klaver <[EMAIL PROTECTED]> writes: > With this setup you will have to use an explicit string- > date_issued + INTERVAL term|| 'years'. This will involve constructing a > string and passing it to INTERVAL. No, that's a truly awful way to do it. The correct way is to use number times inter

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Andrew Kroeger
Jonas Henriksen wrote: >>> explain analyze SELECT max(date_time) FROM data_values; > Goes fast and returns: In prior postgres versions, the planner could not take advantage of indexes with max() (nor min()) calculations. A workaround to this was (given an appropriate index) a query like: select

Re: [GENERAL] Date Math

2007-05-07 Thread Adrian Klaver
On Monday 07 May 2007 12:00 pm, Tom Lane wrote: > Adrian Klaver <[EMAIL PROTECTED]> writes: > > With this setup you will have to use an explicit string- > > date_issued + INTERVAL term|| 'years'. This will involve constructing a > > string and passing it to INTERVAL. > > No, that's a truly awful w

R: [GENERAL] Postgres 8.3-dev

2007-05-07 Thread Paolo Saudin
Thanks for the suggestions, the directory is removed automatically by the installer, and I looked in the registry for any PostgreSQL 8.3 related key with no success, there are lot of keys from previous versions but no one about 8.3-dev. on the VMware XP Home clean machine there is nothing but the

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Isak Hansen
On 5/7/07, Andrew Kroeger <[EMAIL PROTECTED]> wrote: Jonas Henriksen wrote: >>> explain analyze SELECT max(date_time) FROM data_values; > Goes fast and returns: In prior postgres versions, the planner could not take advantage of indexes with max() (nor min()) calculations. A workaround to this

[GENERAL] Win32 upgrade from 8.2.3 -> 8.2.4: What about the Documentation?

2007-05-07 Thread Richard Broersma Jr
I noticed that after upgrading two PostgreSQL windows servers from 8.2.3 to 8.2.4 that the installed documentation is still for 8.2.3 remained. Was this intended, or did I make a mistake during the upgrade? Regards, Richard Broersma Jr. P.S. I was very happy with how easily the upgrade proces

Re: [GENERAL] Postgre Sql 7.3 connection problem

2007-05-07 Thread Osvaldo Rosario Kussama
A. Kretschmer escreveu: am Mon, dem 07.05.2007, um 0:39:43 -0700 mailte nij es folgendes: sir, I am using postgresql 7.3 in Redhat Linux.Windows XP is my client. I want to communicate pgsql without a specific ip rangeI.I want to accept all ip address in postgresql 7.3. How can i comunicate. P

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Tom Lane wrote: No, that's a truly awful way to do it. The correct way is to use number times interval multiplication, eg date_issued + term * '1 year'::interval; This reduces to not much more than a floating-point multiply, whereas the other way involves string-fo

[GENERAL] Continuous Archiving for Multiple Warm Standby Servers

2007-05-07 Thread Thomas F. O'Connell
I'm attempting to design a postgres system whereby an authoritative primary server simultaneously feeds continuous archives to a number of warm standby servers that live both on the local network and on remote networks. The sticking point in my current thinking about such a system is what

[GENERAL] problem with a conditional statement

2007-05-07 Thread Kirk Wythers
I am struggling to get a CASE WHEN statement to work within another CASE WHEN. Here is my original code: SELECT CASE WHEN w.station_id = site_near.station_id THEN w.obs_id ELSE s.obs_id END AS obs_id, site_near.station_id, site_near.longname, w.year, w.doy, w.precip, w.tmin, w.tmax, --repl

Re: [GENERAL] Connections refused during backups

2007-05-07 Thread Glen Eustace
Tom Lane wrote: Glen Eustace <[EMAIL PROTECTED]> writes: My apologies, I shouldn't have used the generic socket error 'Connection refused'. What I am getting are errors like "Could not connect to database" from libnss-pgsql This is the exact message from libnss-pgsql, While you are at it,

Re: [GENERAL] Date Math

2007-05-07 Thread Richard Broersma Jr
>I don't see 'interval' as a data type in the docs. Is it a single-quoted > string? We can do converstions between the UI and storage (in both > directions), so the type in the DDL can be whatever's best. It is shown as the 4th item on table 8-9: http://www.postgresql.org/docs/8.2/interactive/

[GENERAL] JDBC - setting PG variables in URL

2007-05-07 Thread Jan Bilek
Hi, Is it possible to set any of postgre variables in JDBC conection URL? Example: "jdbc:postgresql://localhost:/dbname?pgvar1=value2&pgvar2=value2" Is this or simular construction plausible? We tried it, but it didn't work. OR - question could be put this way: How to set internal postgre varia

Re: [GENERAL] JDBC - setting PG variables in URL

2007-05-07 Thread Joshua D. Drake
Jan Bilek wrote: Hi, Is it possible to set any of postgre variables in JDBC conection URL? Example: "jdbc:postgresql://localhost:/dbname?pgvar1=value2&pgvar2=value2" Is this or simular construction plausible? We tried it, but it didn't work. OR - question could be put this way: How to set inte

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Richard Broersma Jr wrote: It is shown as the 4th item on table 8-9: http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html D'oh! Of course I saw that, but it did not register with me. Thanks, Richard! Rich -- Richard B. Shepard, Ph.D. |

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Chris Browne
[EMAIL PROTECTED] ("Jan Bilek") writes: > I was asking for these "specific/particular reasons". Im not the > database developer, to be expert on indexes (i know whats btree and > hash - gin and gist are rather mysterious for me). > Ok - btree is fine, but sometimes could be better to use gist - my

Re: [GENERAL] Slow query and indexes...

2007-05-07 Thread Jonas Henriksen
Thanks for a good answer, I'll try to find a workaround. The number of data_loggers will change, but not to frequently. I was actually hoping to make a view showing the latest data for each logger, maybe I can manage that with a stored procedure thingy... Regards, Jonas:)) On 5/7/07, Andrew Kro

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Tom Lane wrote: It might be that converting those columns to interval is the best answer, depending on what other processing needs to be done with them. But if Rich wants to leave them as numbers, the above is the best way to convert them to intervals on-the-fly. Columns

[GENERAL] change the stop words file for tsearch2

2007-05-07 Thread Ottavio Campana
How can I change the name of the file with the stop words used by tsearch2? I tried searching in the pg_ts_* tables, but I didn't find anything. Moreover, suppose you have a table with (text,ts_vector,boolean) columns. Do you think it might be possible to use two different files of stop words, in

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-05-07 Thread Richard P. Welty
Frank Finner wrote: You mention Compier not running on PG. Did you look ad ADempiere (http://www.adempiere.com/)? Its a fork of Compiere which claims to run especially with PG (though I did not yet have the time to test it). i did a test install of Adempiere against PostgreSQL on a FC5 box a

[GENERAL] tokenize string for tsearch?

2007-05-07 Thread Ottavio Campana
Hi, I'm trying to use tsearch2 for the first time and I'm having a problem setting up a query If I execute SELECT * from test_table where ts_desc @@ to_tsquery ('hello&world'); it works, but I'm having the problem that the string used for the query is not 'hello&world' but 'hello world', Moreove

[GENERAL] Vacuuming

2007-05-07 Thread Paul Lambert
Is there any point to vacuuming a table if it has been bulk-populated by data after a truncate? I.e. If I do this: TRUNCATE TABLE vehicles; INSERT INTO vehicles (SELECT DISTINCT ON (dealer_id,vehicle_address) * FROM vehicles_temp_load WHERE (dealer_id,vehicle_address) is not null); Is there a

Re: [GENERAL] Vacuuming

2007-05-07 Thread Tom Lane
Paul Lambert <[EMAIL PROTECTED]> writes: > Is there any point to vacuuming a table if it has been bulk-populated by > data after a truncate? > I.e. If I do this: > TRUNCATE TABLE vehicles; > INSERT INTO vehicles (SELECT DISTINCT ON (dealer_id,vehicle_address) * > FROM vehicles_temp_load WHERE (d

Re: [GENERAL] Date Math

2007-05-07 Thread Adrian Klaver
On Monday 07 May 2007 3:19 pm, Rich Shepard wrote: > On Mon, 7 May 2007, Tom Lane wrote: > > It might be that converting those columns to interval is the best answer, > > depending on what other processing needs to be done with them. But if > > Rich wants to leave them as numbers, the above is the

Re: [GENERAL] Date Math

2007-05-07 Thread Rich Shepard
On Mon, 7 May 2007, Adrian Klaver wrote: Yes. Adrian, Whew! :-) Now I'm working on pulling dates from two tables and checking if they're in the current quarter. I see that I need SELECT EXTRACT FROM , and I'm thinking how to incorporate this with the rest of the selection criteria. I'll

Re: [GENERAL] Vacuuming

2007-05-07 Thread Paul Lambert
Tom Lane wrote: The only thing a vacuum would do for you there is set the commit hint bits on the newly-inserted rows. Which might be worth doing if you want to get the table into a totally "clean" state, but it's probably a bit excessive. SELECTs on the table will set the hint bits anyway as

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-05-07 Thread Mariano Mara
Richard P. Welty escribió: Frank Finner wrote: You mention Compier not running on PG. Did you look ad ADempiere (http://www.adempiere.com/)? Its a fork of Compiere which claims to run especially with PG (though I did not yet have the time to test it). i did a test install of Adempiere agains

Re: [GENERAL] Vacuuming

2007-05-07 Thread Tom Lane
Paul Lambert <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> What you *do* want to do in this situation is an ANALYZE. > Should the ANALYZE be done before or after indexes are built? Or is that > irrelevant? For ordinary indexes it doesn't matter. If you have any expression indexes then you sh

Re: [GENERAL] Vacuuming

2007-05-07 Thread Tom Lane
I wrote: >> Is there any point in vacuuming? > The only thing a vacuum would do for you there is set the commit hint > bits on the newly-inserted rows. Which might be worth doing if you want > to get the table into a totally "clean" state, but it's probably a bit > excessive. SELECTs on the tabl

[GENERAL] 'Expensive' column in result set

2007-05-07 Thread Harvey, Allan AC
Hi all, I have a select that involves a column in the result set that is expensive to get. I need to use the expensive column in a subsequent calculated column. Is there a syntax to run the expensive function once only or does it just have to be done, blk_speed() is the expensive function. Exa

Re: [GENERAL] Vacuuming

2007-05-07 Thread Paul Lambert
Tom Lane wrote: I forgot to mention that any other operation that examines every table row will fix all the hint bits as well. In particular a CREATE INDEX would do that --- so if you are planning to create some indexes then there's certainly no point in a VACUUM just after a table load.

Re: [GENERAL] tokenize string for tsearch?

2007-05-07 Thread Oleg Bartunov
On Mon, 7 May 2007, Ottavio Campana wrote: Hi, I'm trying to use tsearch2 for the first time and I'm having a problem setting up a query If I execute SELECT * from test_table where ts_desc @@ to_tsquery ('hello&world'); it works, but I'm having the problem that the string used for the query i

Re: [GENERAL] change the stop words file for tsearch2

2007-05-07 Thread Oleg Bartunov
Ottavio, On Mon, 7 May 2007, Ottavio Campana wrote: How can I change the name of the file with the stop words used by tsearch2? I tried searching in the pg_ts_* tables, but I didn't find anything. Moreover, suppose you have a table with (text,ts_vector,boolean) columns. Do you think it might

Re: [GENERAL] Postgre Sql 7.3 connection problem

2007-05-07 Thread A. Kretschmer
am Mon, dem 07.05.2007, um 17:15:04 -0300 mailte Osvaldo Rosario Kussama folgendes: > >First, 7.3 are out of date... > > > >You should check if your PG-Server listening on TCP/IP. Take a look into > >your postgresql.conf, you need an entry like 'listen_addresses = ...'. > > Valid only in 8.+ ver

Re: [GENERAL] 'Expensive' column in result set

2007-05-07 Thread Tom Lane
"Harvey, Allan AC" <[EMAIL PROTECTED]> writes: > select > b.block, > b.p_code, > p.description, > p.blk_speed as "set", > blk_speed( b.block ) as "actual", > blk_speed( b.block ) / ( p.blk_speed + 0.0001 ) * 100 as "Speed %" > from block b, product p > where b.p_code = p.p_c

Re: [GENERAL] 'Expensive' column in result set

2007-05-07 Thread Harvey, Allan AC
Tom, Thank you. I shall experiment. > "Harvey, Allan AC" <[EMAIL PROTECTED]> writes: > > select > > b.block, > > b.p_code, > > p.description, > > p.blk_speed as "set", > > blk_speed( b.block ) as "actual", > > blk_speed( b.block ) / ( p.blk_speed + 0.0001 ) * 100 > as "Spe

Re: [GENERAL] Vacuuming

2007-05-07 Thread Pavan Deolasee
On 5/8/07, Tom Lane <[EMAIL PROTECTED]> wrote: I forgot to mention that any other operation that examines every table row will fix all the hint bits as well. In particular a CREATE INDEX would do that --- I might be missing something, but I think CREATE INDEX work on SnapshotAny and hence m

Re: [GENERAL] Vacuuming

2007-05-07 Thread Tom Lane
"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > On 5/8/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> I forgot to mention that any other operation that examines every table >> row will fix all the hint bits as well. In particular a CREATE INDEX >> would do that --- > I might be missing something, but

Re: [GENERAL] Vacuuming

2007-05-07 Thread Pavan Deolasee
On 5/8/07, Tom Lane <[EMAIL PROTECTED]> wrote: SnapshotAny is a no-op, but HeapTupleSatisfiesVacuum isn't. Oh yes. My apologies for forgetting IndexBuildHeapScan() Thanks, Pavan -- EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] PITR and tar

2007-05-07 Thread Albe Laurenz
> The docs recommend using tar to perform a base backup for PITR. > > Usually, tar reports notices like: > "tar: Truncated write; file may have grown while being archived." Did you call pg_start_backup(text) before you started to archive? Yours, Laurenz Albe ---(end of b