Re: [GENERAL] Need suggestion

2011-06-02 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Following up on myself: Just stumbled upon this in the hackers mailing list, which might be interesting to you, since it highlights pros & cons of current implementations: Re

Re: [GENERAL] Need suggestion

2011-06-02 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Jun 01, 2011 at 10:08:14AM +0200, Carl von Clausewitz wrote: > Hello Everyone, > > I got a new project, with 100 user in Europe. In this case, I need to handle > production and sales processes an its documentations in PostgreSQL with PHP. Som

[GENERAL] Hidden Risk w/ UPDATE Cascade and Trigger-Based Validation

2011-06-02 Thread David Johnston
Hi, I am trying to get a better understanding of how the following Foreign Keys with Update Cascades and validation trigger interact. The basic setup is a permission table where the two permission parts share a common "group/parent" which is embedded into their id/PK and which change via the F

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2011-06-02 Thread Derrick Rice
That specific character sequence is a result of Unicode implementations prior to 6.0 mixing with later implementations. See here: http://en.wikipedia.org/wiki/Specials_%28Unicode_block%29#Replacement_character You could replace that sequence with the correct 0xFFFD sequence with `sed` for exampl

[GENERAL] invalid byte sequence for encoding "UTF8"

2011-06-02 Thread BRUSSER Michael
We upgrading some old database (7.3.10 to 8.4.4). This involves running pg_dump on the old db and loading the datafile to the new db. If this matters we do not use pg_restore, the dump file is just sourced with psql, and this is where I ran into problem: psql: .../postgresql_archive.src/...

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-06-02 Thread Bosco Rama
Merlin Moncure wrote: > On Tue, May 31, 2011 at 7:35 PM, Bosco Rama wrote: >> Unfortunately, like you, I am just a user of this wonderful DB. Since >> we are not seeing any other input here on the 'general' list it may be >> time to move this thread to the pgsql-interfaces list. Are you subscrib

Re: [GENERAL] Passing parameters into an in-line psql invocation

2011-06-02 Thread Leif Biberg Kristensen
On Thursday 2. June 2011 18.58.23 Gauthier, Dave wrote: > Hi: > > I'd like to pass a parameter into an inline psql call that itself calls an > sql script, something like... > > psql mydb -c "\i thesqlscript foo" > > Where"foo" is the value I want to pass in. > > Just as good would be the abilit

Re: [GENERAL] Passing parameters into an in-line psql invocation

2011-06-02 Thread Bosco Rama
Gauthier, Dave wrote: > > I'd like to pass a parameter into an inline psql call that itself > calls an sql script, something like... > > psql mydb -c "\i thesqlscript foo" > > Where"foo" is the value I want to pass in. You may want to use the --set or --variable options of psql and then referen

Re: [GENERAL] Passing parameters into an in-line psql invocation

2011-06-02 Thread John R Pierce
On 06/02/11 9:58 AM, Gauthier, Dave wrote: Hi: I'd like to pass a parameter into an inline psql call that itself calls an sql script, something like... psql mydb -c "\i thesqlscript foo" Where"foo" is the value I want to pass in. on the psql command line, -v name=value or --set

[GENERAL] Passing parameters into an in-line psql invocation

2011-06-02 Thread Gauthier, Dave
Hi: I'd like to pass a parameter into an inline psql call that itself calls an sql script, something like... psql mydb -c "\i thesqlscript foo" Where"foo" is the value I want to pass in. Just as good would be the ability to sniff out an environment variable from within the sql script ("thesql

Re: [GENERAL] Need suggestion

2011-06-02 Thread John R Pierce
On 06/02/11 2:19 AM, Ognjen Blagojevic wrote: 1. Files stored on the filesystem: - Small database footprint - Faster backup, export and import 2. Files stored in the database - RDBMS takes care of transactions and ref. int. - Slower backup, export and import but all done in one step - Easier con

Re: [GENERAL] Access to postgres conversion

2011-06-02 Thread akp geek
The only problem I am seeing with dates as you mentioned. when I export the data to csv the date is getting the format of 8/1/1955 0:00:00 , but postgres not accepting that. Any clues? Regards On Thu, Jun 2, 2011 at 11:23 AM, Vick Khera wrote: > On Thu, Jun 2, 2011 at 10:01 AM, akp geek wrote:

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-06-02 Thread Merlin Moncure
On Tue, May 31, 2011 at 7:35 PM, Bosco Rama wrote: > Unfortunately, like you, I am just a user of this wonderful DB.  Since > we are not seeing any other input here on the 'general' list it may be > time to move this thread to the pgsql-interfaces list.  Are you subscribed > to it?  It is a very l

Re: [GENERAL] Access to postgres conversion

2011-06-02 Thread Vick Khera
On Thu, Jun 2, 2011 at 12:01 PM, akp geek wrote: > The only problem I am seeing with dates as you mentioned. when I export the > data to csv the date is getting the format of 8/1/1955 0:00:00 , but > postgres not accepting that. Any clues? Should work: test=> select '8/1/1955 0:00:00'::date;

Re: [GENERAL] Need suggestion

2011-06-02 Thread Ben Chobot
On Jun 1, 2011, at 1:08 AM, Carl von Clausewitz wrote: > Hello Everyone, > > I got a new project, with 100 user in Europe. In this case, I need to handle > production and sales processes an its documentations in PostgreSQL with PHP. > The load of the sales process is negligible, but every user

Re: [GENERAL] Need suggestion

2011-06-02 Thread Ognjen Blagojevic
Carl, Please keep in mind I am not a Postgres expert nor consultant, I'm just sharing my experience. I would also like to hear the opinion of other people who worked on projects with similar database sizes. I would keep all files in the single table -- most probably they will be served to th

Re: [GENERAL] Access to postgres conversion

2011-06-02 Thread Vick Khera
On Thu, Jun 2, 2011 at 10:01 AM, akp geek wrote: > Thanks so much . I was using bullzip What I felt with Bullzip was it is good > for less amount of data.  I have 2 tables each of which has 2.5 million > records.  For me it is taking for ever, The job that I set up has been > running since 12 hour

Re: [GENERAL] Access to postgres conversion

2011-06-02 Thread akp geek
Thanks so much . I was using bullzip What I felt with Bullzip was it is good for less amount of data. I have 2 tables each of which has 2.5 million records. For me it is taking for ever, The job that I set up has been running since 12 hours. I appreciate if you could share the VBA code that you

Re: [GENERAL] Access to postgres conversion

2011-06-02 Thread Thomas Harold
On 5/25/2011 3:42 PM, akp geek wrote: Dear all - I would like to know if any one has migrated database from MS access to Postgres . We use postgres 9.0.2 on solaris . Are there any open source tools that you have used to do this task. Can you please share your experiences ? I rol

[GENERAL] using jboss with ident auth

2011-06-02 Thread eyal edri
Hi, I'm trying to use postgres with ident auth and jboss. here's my postgres files: pg_hba.conf: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident map=vmap # IPv4

Re: [GENERAL] Table with active and historical data

2011-06-02 Thread salah jubeh
Hello, I think, one good thing to do is partionning, you have already mentioned that in your mail, http://www.postgresql.org/docs/current/static/ddl-partitioning.html try to run also vaccuum command it might help in increasing the performance. create a boolean flag i.e. active and create an i

Re: [GENERAL] Need suggestion

2011-06-02 Thread Carl von Clausewitz
Dear Ognjen, thank you - that was my idea too, but I've never seen such a workload like this. The docu's (which are not processed by any ocr hopefully) and the pictures are not indexed off course, just some metadatas, which are related to the exact docu, or pic For example: productions_docu1: -se

Re: [GENERAL] Need suggestion

2011-06-02 Thread Ognjen Blagojevic
Carl, I don't have experience with that big databases, but I did both solutions, and here are pros of both of them: 1. Files stored on the filesystem: - Small database footprint - Faster backup, export and import 2. Files stored in the database - RDBMS takes care of transactions and ref. int.

Re: [GENERAL] Question about configuration and SSD

2011-06-02 Thread Craig Ringer
On 02/06/11 16:26, Szymon Guz wrote: > Hi, > do we need some special configuration for SSD drives, or is that enough > to treat those drives normally? Make sure the SSDs have a supercapacitor or battery backup for their write cache. If they do not, then do not use them unless you can disable write

[GENERAL] Question about configuration and SSD

2011-06-02 Thread Szymon Guz
Hi, do we need some special configuration for SSD drives, or is that enough to treat those drives normally? regards Szymon

Re: [GENERAL] Returning from insert on view

2011-06-02 Thread Dean Rasheed
On 1 June 2011 10:32, Aleksey Chirkin wrote: > Hello! > > I need your advice. > My problem is to ensure that the right returning from insert on the view. > > For example, I have two tables: > > CREATE TABLE country (id serial, nm text); > CREATE TABLE city (id serial, country_id integer, nm text);

Re: [GENERAL] DBD::PG and long running queries and tcp stack timeout

2011-06-02 Thread Clemens Schwaighofer
yeah there is a NAT firewall inbetween. I can check there too. But interesting thing is, if I set the tcp_keepalive_time higher it won't time out. But still ... a bit strange. 2011/6/2 John R Pierce : > On 06/01/11 11:35 PM, Clemens Schwaighofer wrote: >> >> Hi, >> >> I have a script that runs a

Re: [GENERAL] DBD::PG and long running queries and tcp stack timeout

2011-06-02 Thread John R Pierce
On 06/01/11 11:35 PM, Clemens Schwaighofer wrote: Hi, I have a script that runs a query on a remote server. The query will take quite some time to finish. Now the problem is that the tcp stack will timeout before the query is finished. is there a NAT firewall or something else in the middle t

[GENERAL] DBD::PG and long running queries and tcp stack timeout

2011-06-02 Thread Clemens Schwaighofer
Hi, I have a script that runs a query on a remote server. The query will take quite some time to finish. Now the problem is that the tcp stack will timeout before the query is finished. I am running the query as async and have a loop where I query the pg_ready status every 5 seconds. Is there an