[GENERAL] Problem with complex outer join expression

2006-04-25 Thread Chris Velevitch
I'm using 7.4.5 on win XP Pro SP1. I'm getting:- ERROR: syntax error at or near "(" at character 155 from the query:- select dummy_records.sequence_nr,timesheets.weekending,timesheets.timesheet_id from dummy_records ,left outer join timesheets on (timesheets.weekending =

Re: [GENERAL]

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 20:33:39 -0700 mailte Mike Kim folgendes: > Hello, > > I was wondering if anybody know a tool or postgres > command which would allow me to see how much data is > written to hardrive and read from hardrive by Postgres Take a look into the information schema, there are table li

Re: [GENERAL] Anyone install 8.1 on Debian Stable?

2006-04-25 Thread Bill Moseley
On Tue, Apr 25, 2006 at 06:58:20PM +0100, Gavin Hamill wrote: > As per the instructions on the site - you use both :) (I meant which do you pin the specific package or use the -t option.) > > psql for both 7.x and 8.1 will use version 3 of the libpq API, so > there's no issue like with mysql 4.0

[GENERAL]

2006-04-25 Thread Mike Kim
Hello, I was wondering if anybody know a tool or postgres command which would allow me to see how much data is written to hardrive and read from hardrive by Postgres in given time period. (let's say last 24h) Thank you, __ Do You Yahoo!? Tired of

Re: [GENERAL] "ERROR: out of memory" during pg_restore

2006-04-25 Thread Wayne Conrad
Tom, You bet. I'll give it a go and report back. On Tue, Apr 25, 2006 at 08:39:46PM -0400, Tom Lane wrote: > I've applied the attached patch to 8.1.*, > but it could use more testing --- do you want to patch locally and > confirm it's OK for you? ---(end of broadcast)

Re: [GENERAL] Please comment on the following OpenFTS/tsearch2 issues!

2006-04-25 Thread John DeSoi
On Apr 25, 2006, at 3:45 PM, Don Walker wrote: 2. Neither OpenFTS or tsearch2 support exact phrase matching. I've seen the workaround to support matching a single exact phrase by modifying the WHERE clause with textcolumn ~* "exact phrase". Does this give reasonable performance? It seems

Re: [GENERAL] "ERROR: out of memory" during pg_restore

2006-04-25 Thread Tom Lane
Wayne Conrad <[EMAIL PROTECTED]> writes: > I've got a 7.4 database that gives postgres an "out of memory" error > when restoring into a 32-bit build 8.1, yet restores into a 64-bit > build of 8.1. > Filesystem: -1367351296 total in 361 blocks; 34704 free (305 chunks); > -1367386000 used Now that

Re: [GENERAL] Database Selection

2006-04-25 Thread Chris Browne
[EMAIL PROTECTED] (Scott Marlowe) writes: > About the security thing. Security is a process, and you won't get > it from using two different database engines. I'd argue that security is an "emergent property" which is either supported by or undermined by particular facts/features/configurations.

Re: [GENERAL] SQL Rule

2006-04-25 Thread Kenneth Downs
Bert wrote: Hi list I have a table construction like the one seen below, when i am updating or inserting i get a recurion, logical. But how to manage it that the rule is just doing it one time. Or is it possible to do the sum of a and b in an other way? Bert, i do this with triggers. There

Re: [GENERAL] SQL Rule

2006-04-25 Thread Wayne Conrad
On Tue, Apr 25, 2006 at 02:27:23PM -0700, Bert wrote: > I have a table construction like the one seen below, when i am updating > or inserting i get a recurion, logical. But how to manage it that the > rule is just doing it one time. Or is it possible to do the sum of a > and b in an other way? > .

[GENERAL] "ERROR: out of memory" during pg_restore

2006-04-25 Thread Wayne Conrad
I've got a 7.4 database that gives postgres an "out of memory" error when restoring into a 32-bit build 8.1, yet restores into a 64-bit build of 8.1. I dumped a 7.4.9 database, running on Debian/testing, 32-bit, using this command: pg_dump --format=c --blobs production --verbose >production.d

Re: [GENERAL] SQL Rule

2006-04-25 Thread Oisin Glynn
Could you create the table without the C column then create a view test_view with select a,b,a+b as c,id from test; Oisin Bert wrote: Hi list I have a table construction like the one seen below, when i am updating or inserting i get a recurion, logical. But how to manage it that the rule is j

[GENERAL] SQL Rule

2006-04-25 Thread Bert
Hi list I have a table construction like the one seen below, when i am updating or inserting i get a recurion, logical. But how to manage it that the rule is just doing it one time. Or is it possible to do the sum of a and b in an other way? CREATE TABLE test ( a int2, b int2, c int2, id

Re: [GENERAL] Having problems with a 25 million row table on 8.1.3

2006-04-25 Thread Andrew - Supernews
On 2006-04-25, Tony Caduto <[EMAIL PROTECTED]> wrote: > Hi, > I have a client who has a 25 million row table that is used to keep > track of financial security info. > So far it has worked great, but today someone wanted to get all the tax > codes(there are lot's of dupes) from the table. > So we

Re: [GENERAL] Having problems with a 25 million row table on 8.1.3

2006-04-25 Thread Joshua D. Drake
# - Memory - shared_buffers = 15000 # min 16 or max_connections*2, 8KB each #temp_buffers = 1000# min 100, 8KB each #max_prepared_transactions = 5 # can be 0 or more # note: increasing max_prepared_transactions costs ~600 bytes of shared memory

[GENERAL] Please comment on the following OpenFTS/tsearch2 issues!

2006-04-25 Thread Don Walker
This topic was originally posted to the OpenFTS-general list on April 24, 2006. There were no replies in about 22 hours so I'm reposting to this more active list. I'm investigating OpenFTS and tsearch2 to see if they provide enough full-text searching features to be used in a new application. I've

Re: [GENERAL] Having problems with a 25 million row table on 8.1.3

2006-04-25 Thread Martijn van Oosterhout
On Tue, Apr 25, 2006 at 03:10:32PM -0500, Tony Caduto wrote: > Hi, > I have a client who has a 25 million row table that is used to keep > track of financial security info. > So far it has worked great, but today someone wanted to get all the tax > codes(there are lot's of dupes) from the table.

[GENERAL] Having problems with a 25 million row table on 8.1.3

2006-04-25 Thread Tony Caduto
Hi, I have a client who has a 25 million row table that is used to keep track of financial security info. So far it has worked great, but today someone wanted to get all the tax codes(there are lot's of dupes) from the table. So we tried this: select DISTINCT tax_code from warehouse.sec_trans

Re: [GENERAL] Anyone install 8.1 on Debian Stable?

2006-04-25 Thread Gavin Hamill
On Tue, 25 Apr 2006 10:06:12 -0700 Bill Moseley <[EMAIL PROTECTED]> wrote > Ok. So as someone that tried to understand pinning once and gave up, > do you pin the packages or use: > > apt-get -t sarge-backports install postgresql > > method? As per the instructions on the site - you use bo

[GENERAL] how can I check the error status??

2006-04-25 Thread Luis Alberto Pérez Paz
Hi everybody!   I'm migrating some sybase store procedures to postgres functions, I almost have found all that I need, however I dont know how to check the error status of the last transaction. I need to find in postgres the equivalent to the sybase @@error global variable.   I mean, how can I tran

Re: [GENERAL] Anyone install 8.1 on Debian Stable?

2006-04-25 Thread Bill Moseley
On Tue, Apr 25, 2006 at 04:57:20PM +0100, Gavin Hamill wrote: > Very simple www.backports.org :) > > They have 8.1.3 and it works perfectly.. even the -contrib package is > there for cube/earthdistance, and the -dev package is there if you want > to compile Slony, etc. > > Follow http://www.bac

[GENERAL] Anyone install 8.1 on Debian Stable?

2006-04-25 Thread Bill Moseley
Anyone installed 8.1 on Stable? Did you build from source or use a backport? I've got a managed dedicated server at Dreamhost and trying to decide if building from source or using a backport is a better approach. I've had problems in the past with using backports on other servers (problems showe

Re: [GENERAL] Database Selection

2006-04-25 Thread Alban Hertroys
IvoD wrote: real experience and real enterprise applications. And last but not least - I must run db engine on Win platform (not Linux) and all the "success stories" assume Linux platform. So does somebody here know Well, for one thing... I have some experience with MySQL in that respect, and

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Csaba Nagy
On Tue, 2006-04-25 at 17:49, Jim Buttafuoco wrote: > just for the record the following also works > > from the psql prompt: > jim=# create database "testing > jim"# "; > CREATE DATABASE > jim=# drop database "testing > jim"# " > jim-# ; > DROP DATABASE > jim=# > > and from the unix shell: > crea

Re: [GENERAL] Anyone install 8.1 on Debian Stable?

2006-04-25 Thread Gavin Hamill
Bill Moseley wrote: Anyone installed 8.1 on Stable? Did you build from source or use a backport? Very simple www.backports.org :) They have 8.1.3 and it works perfectly.. even the -contrib package is there for cube/earthdistance, and the -dev package is there if you want to compile Slon

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Jim Buttafuoco
just for the record the following also works from the psql prompt: jim=# create database "testing jim"# "; CREATE DATABASE jim=# drop database "testing jim"# " jim-# ; DROP DATABASE jim=# and from the unix shell: createdb "testing " dropdb "testing " you need the double quotes in all cases --

Re: [GENERAL] Database Selection

2006-04-25 Thread Scott Marlowe
On Tue, 2006-04-25 at 01:26, IvoD wrote: > I read many web pages about both PostgreSQL and MySQL, I read also > "case studies" at pg web, but I prefer opinions of real users :-) I > installed both db engines on my PC three weeks ago and now I test it. > But I'm sure there should be "features" that

Re: [GENERAL] Partitioning rule not behaving as expected

2006-04-25 Thread Nik
Oh ok, that makes sense. Thanks for the explanation. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Partitioning rule not behaving as expected

2006-04-25 Thread Nik
I created a master table and three partition tables as per Postgres documentation. I also created three rules that match the check constraints. When I insert the values into the master table, the rules seem to be functional since the data is routed to the appropriate partition tables. However, data

Re: [GENERAL] "save history" problem

2006-04-25 Thread David F. Johnson
Hi Martijn. Thanks for the tip on there being no real difference in the two paths (i.e., I'm not a Unix guy). Unfortunately, as I said in my original post, using the .psqlrc option to set the HISTFILE to the user directory didn't work either. After changing ownership of the /usr/local/pgsql/ to

[GENERAL] Commit rules or Commit trigger

2006-04-25 Thread Claudio Tognolo
I am developing a temporal database and I have the necessity to control the integrity constraints befor the commit of the transiction.I cannot use the deferrable checking because the integrity constraints is a select and i cannot use the trigger or rule because the event parameter not support the

Re: [GENERAL] Database Selection

2006-04-25 Thread IvoD
My "sixth sense" tells me that PostgreSQL is better than MySQL, therefore for main app I prefer PostgreSQL; but I am in doubt to run only one db engine for two databases. But my "inner space" tells me to separate newsgroups system and company data system and run two different db engines - in light

Re: [GENERAL] Partitioning rule not behaving as expected

2006-04-25 Thread [EMAIL PROTECTED]
Since partitioning is just specialized inheritance, your zone_data table doesn't actually have any rows in it, its just using the default behavior of Postgres (from the manual: http://www.postgresql.org/docs/8.1/interactive/ddl-inherit.html): "In PostgreSQL, a table can inherit from zero or more o

Re: [GENERAL] Database Selection

2006-04-25 Thread IvoD
I read many web pages about both PostgreSQL and MySQL, I read also "case studies" at pg web, but I prefer opinions of real users :-) I installed both db engines on my PC three weeks ago and now I test it. But I'm sure there should be "features" that I am not able to catch (e.g. MIN() function speed

Re: [GENERAL] Transactions, PostgreSQL and MS Access front end.

2006-04-25 Thread arthurjr07
Try to use ADO Dim con as ADODB.Connection set con = new ADODB.Connection con.Open "DRIVER={PostgreSQL}; SERVER=ipaddress; port=5432; DATABASE=dbname; UID=username;PWD=password;" con.BeginTrans con.Execute "UPDATE accounts SET balance = balance + 10

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Ari Kahn
I would call you an genius, but ... :-) Anyway, that worked and is the solution! postgres=# update pg_database set datname='foodmart' where datname like 'foodmart%'; UPDATE 1 postgres=# drop database foodmart; DROP DATABASE THANKS! On Apr 25, 2006, at 11:13 AM, Jim Buttafuoco wrote: why n

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Jim Buttafuoco
why not just update pg_database set datname='foodmart' where datname like 'foodmart%'; -- Original Message --- From: Ari Kahn <[EMAIL PROTECTED]> To: Tom Lane <[EMAIL PROTECTED]> Cc: Stephen Frost <[EMAIL PROTECTED]>, pgsql-general@postgresql.org Sent: Tue, 25 Apr 2006 11:08:09

Re: [GENERAL] postgreslog-semctl(7438339, 4, SETVAL, 0) failed:

2006-04-25 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > <2006-04-19 01:13:25 IST%startup>FATAL: semctl(7438339, 4, SETVAL, 0) > failed: Invalid argument Kinda looks like something deleted your semaphores --- does "ipcs -s" show anything? Stopping and restarting the postmaster should fix it, if so, but yo

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Ari Kahn
On Apr 25, 2006, at 10:51 AM, Tom Lane wrote: Ari Kahn <[EMAIL PROTECTED]> writes: You'll notice the database foodmart has a carriage return or new line. I still can't figure out how to get rid of it though. Perhaps something along the lines of drop database "foodmart ";

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Tom Lane
Ari Kahn <[EMAIL PROTECTED]> writes: > You'll notice the database foodmart has a carriage return or new > line. I still can't figure out how to get rid of it though. Perhaps something along the lines of drop database "foodmart "; regards, tom lane -

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Ari Kahn
On Apr 25, 2006, at 8:46 AM, Stephen Frost wrote: * Ari Kahn ([EMAIL PROTECTED]) wrote: That was a good idea. But this is not the case. You might try just looking at pg_database directly: select * from pg_database; Or (as someone else suggested) pipeing the output into a file which you can

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Stephen Frost
* Ari Kahn ([EMAIL PROTECTED]) wrote: > That was a good idea. But this is not the case. You might try just looking at pg_database directly: select * from pg_database; Or (as someone else suggested) pipeing the output into a file which you can then look at. As a side-note: I'm a graduate studen

Re: [GENERAL] How to have a blind-superuser

2006-04-25 Thread Geoffrey
Tom Lane wrote: If you don't trust your DBA, You should fire him/her... -- Until later, Geoffrey Any society that would give up a little liberty to gain a little security will deserve neither and lose both. - Benjamin Franklin ---(end of broadcast)--

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Geoffrey
Ari Kahn wrote: I think the issue is something like this though. Send the output of your database listing to a pipe through 'cat -evt' and see if you've got any unusual characters in the names of your databases: echo '\l' | psql template1 |cat -evt -- Until later, Geoffrey Any society tha

Re: [GENERAL] How to have a blind-superuser

2006-04-25 Thread Geoffrey
Steve Atkins wrote: So... you're not going to be able to do this _at_all_ from within the database. You're going to need an external solution, probably a hideous seteuid thing, if you really want to do this. And it's a really bad idea, so you probably don't want to. Thinking out loud on this o

Re: [GENERAL] How to close dead connections immediately

2006-04-25 Thread Andrus
> PG *will* close the connection immediately if it receives any > notification of connection drop from the client. If it's not seeing > one, that suggests something wrong in your network infrastructure. > I'd suggest fixing the problem rather than kluging the symptom. I have W2K server running al

[GENERAL] postgreslog-semctl(7438339, 4, SETVAL, 0) failed:

2006-04-25 Thread surabhi.ahuja
I am using postges, 8.0.0 on that system , it seems that there are two databases, i am not sure if the same postmaster is used to connect to both the databases,     i am seeing these logs in postgreslog   <2006-04-19 01:13:25 IST%>LOG:  connection received: host=[local] port=<2006-04-19 01:13:2

Re: [GENERAL] isnumeric - checking if text variable is convertable to numeric

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 2:01:49 -0700 mailte SunWuKung folgendes: > I tried this but couldn't find out what would be the WHEN condition for > > Select Cast('asdf' as numeric) > ERROR: invalid input syntax for type numeric create or replace function check_numeric(varchar) returns bool as $$ declare

Re: [GENERAL] Starting Postgresql as windows service

2006-04-25 Thread Harald Armin Massa
Rajarajan,please check the postgresql logs witin pg_logyour data directory defaults to [programs]\Postgresql\8.1\datawhere [programs] is ~"Programs and Files" in US Windows, and "Programme" in German Windows. Propably there is some problem with postgresql.conf or access to your datafiles; the log

[GENERAL] Starting Postgresql as windows service

2006-04-25 Thread Rajarajan
Hi I want to start psql as a windows service manually.How to do that?i was able to register the service but able to start it..when i start it ..i got the following message..---Services ---The PostgreSQL service on Local Computer started and then stopp

Re: [GENERAL] isnumeric - checking if text variable is convertable to numeric

2006-04-25 Thread SunWuKung
I tried this but couldn't find out what would be the WHEN condition for Select Cast('asdf' as numeric) ERROR: invalid input syntax for type numeric regards, Balázs ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Tom Lane
Ari Kahn <[EMAIL PROTECTED]> writes: > On Apr 25, 2006, at 3:25 AM, Tom Lane wrote: >> If so, I'm wondering if you've got a database with a carriage return >> embedded in the name, or something like that. > That was a good idea. But this is not the case. > postgres=# drop database "\n"; > ERROR:

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Ari Kahn
On Apr 25, 2006, at 3:25 AM, Tom Lane wrote: Ari Kahn <[EMAIL PROTECTED]> writes: I was trying to dump all my databases: su - postgres /usr/local/bin/pg_dumpall > /Volumes/Space/postgresql_060425.dump I get: " does not exist database "foodmartto database "foodmart ", exiting: pg_dump faile

Re: [GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Tom Lane
Ari Kahn <[EMAIL PROTECTED]> writes: > I was trying to dump all my databases: > su - postgres > /usr/local/bin/pg_dumpall > /Volumes/Space/postgresql_060425.dump > I get: > " does not exist database "foodmartto database "foodmart > ", exiting: pg_dump failed on database "foodmart > I guess I had

Re: [GENERAL] remove another version of postgreSQL

2006-04-25 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > how can i remove that version, i think it is installed from rpms rpm -e would be the thing, then. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the pla

Re: [GENERAL] invalid memory alloc request size 1684370054

2006-04-25 Thread Tom Lane
Brendan Duddridge <[EMAIL PROTECTED]> writes: > Next exception:SQL State:XX000 -- error code: 0 -- msg: ERROR: > invalid memory alloc request size 1684370054 > I'm not sure which memory setting I need to change to correct this. This looks more like a "corrupt data" problem than an "insufficient

[GENERAL] pg_dumpall: does not exist database

2006-04-25 Thread Ari Kahn
I was trying to dump all my databases: su - postgres /usr/local/bin/pg_dumpall > /Volumes/Space/postgresql_060425.dump I get: " does not exist database "foodmartto database "foodmart ", exiting: pg_dump failed on database "foodmart I guess I had a database called foodmart at one time. However,