Re: [GENERAL] Encodings

2006-02-20 Thread Peter Eisentraut
Am Montag, 20. Februar 2006 08:55 schrieb Jan Cruz: When restoring a dump from sql_ascii encoding to latin9/utf8 This statement is both poorly specified and nonsensical. Please give us a more precise account of what you are doing. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Alban Hertroys
Chad wrote: Thanks Martijn, Well, in the backend you can do things like open a btree index, setup an ScanKey to indicate which values you want and then keep calling getnext(). If you set your scankey to (col1 = 'A') it will start at 'A' and go up from there... That looks suspiciously much

Re: [GENERAL] simple explain output.

2006-02-20 Thread Andreas Seltenreich
Chris writes: At the moment the explain output can get complicated to parse and process, so I'm trying to think of another approach to use. Any suggestions are welcome :) I think the solution is using debug_print_plan (a guc variable). You can use it to get machine-readable plans in the logs

[GENERAL] What is the syntax for setting a default date in PostgreSQL?

2006-02-20 Thread Frank Church
This issue always stumps me. I need to set the default date for a column in postgres. A value for today, today + x days, now (timestamp), now + x amount of days. I never seem to be able to locate it in the documentation or online. Can anyone post it here once and for all for posterity? I will

Re: [GENERAL] What is the syntax for setting a default date in PostgreSQL?

2006-02-20 Thread Alban Hertroys
Frank Church wrote: This issue always stumps me. I need to set the default date for a column in postgres. A value for today, today + x days, now (timestamp), now + x amount of days. CURRENT_DATE, CURRENT_DATE + x, now(), now() + 'x days'::interval are a few options. -- Alban Hertroys [EMAIL

Re: [GENERAL] psql Copy question

2006-02-20 Thread Richard Huxton
Virag Saksena wrote: Hi, I am using copy command in psql to load several million rows from a file Is it possible to have a progress indicator print a dot after every 100,000 rows are inserted ? No - sorry. -- Richard Huxton Archonet Ltd ---(end of

Re: [GENERAL] psql Copy question

2006-02-20 Thread A. Kretschmer
am 19.02.2006, um 23:24:57 -0800 mailte Virag Saksena folgendes: Hi, I am using copy command in psql to load several million rows from a file Is it possible to have a progress indicator print a dot after every 100,000 rows are inserted ? split the file into files with only 100,000 rows,

[GENERAL] Postgresql win32 vs MySql win32

2006-02-20 Thread Tony Caduto
I have been playing around with Mysql in order to add support for it to PG Lightning Admin and I crashed the Mysql win32 5.0 version 5 times in 10 minutes just executing some basic SQL show commands. Postgresql win32 is FAR more stable than MySQL win32 and much easier to install. Just thought

Re: [GENERAL] connecting to pgsql

2006-02-20 Thread Michael MacLennan
I restarted postgresql but that wasn't the problem I didn't have the proper settings in pg.hba.conf. I added the setting # host all all 192.168.1.100/32 md5 and that worked. I am running the most recent version of postres and postgis. I can now connect on the network but I can not open the a DB

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Chad
Firstly thank you to all who have taken the time to reply so far. I need to clarify a few things based on the feedback I have received. 1. I understand the concerns you have about people using internal APIs that the developers are free to change. I also understand the risks I take if I use an

[GENERAL] What is the syntax for setting a default date in PostgreSQL

2006-02-20 Thread lists
This issue always stumps me. I need to set the default date for a column in postgres. A value for today, today + x days, now (timestamp), now + x amount of days. I never seem to be able to locate it in the documentation or online. Can anyone post it here once and for all for posterity? I will

Re: [GENERAL] What is the syntax for setting a default date in PostgreSQL

2006-02-20 Thread Andreas Kretschmer
[EMAIL PROTECTED] [EMAIL PROTECTED] schrieb: This issue always stumps me. I need to set the default date for a column in postgres. A value for today, today + x days, now (timestamp), now + x amount of days. test=# select current_date; date 2006-02-20 (1 row) test=#

[GENERAL] How to determine number of established connections

2006-02-20 Thread Andrus
When connectiong to database my application needs to determine how many connections is currently established to Postgres server. Any idea which query I should use ? I can create temporary table at startup of each connection. But how to count the number of temporary tables created by all

Re: [GENERAL] How to determine number of established connections

2006-02-20 Thread Michael Fuhr
On Mon, Feb 20, 2006 at 07:39:55PM +0200, Andrus wrote: When connectiong to database my application needs to determine how many connections is currently established to Postgres server. You could query pg_stat_activity or the underlying statistics collector functions.

Re: [GENERAL] How to determine number of established connections

2006-02-20 Thread A. Kretschmer
am 20.02.2006, um 19:39:55 +0200 mailte Andrus folgendes: When connectiong to database my application needs to determine how many connections is currently established to Postgres server. select * from pg_stat_activity ; I can create temporary table at startup of each connection. But how to

[GENERAL] How to specify infinity for intervals ?

2006-02-20 Thread Karsten Hilbert
I am storing the maximum age a vaccination is due in a patient (eg. don't give this vaccination beyond the age of 10 years or some such). Some vaccinations are to be given regardless of age. Up to now I have used NULL to mean no maximum age. That doesn't really feel right and also complicates the

Re: [GENERAL] How to determine number of established connections

2006-02-20 Thread Andrus
You could query pg_stat_activity or the underlying statistics collector functions. http://www.postgresql.org/docs/8.1/interactive/monitoring-stats.html Statistics collector reports lag behind actual activity but they might suffice for whatever you're doing. Why does your application need

[GENERAL] Bus error on make check

2006-02-20 Thread Doug Hall
I get the following errors upon running a make check for 8.1.3: ./pg_regress: line 503: 9002 Bus error $bindir/psql - X $psql_options postgres /dev/null 2/dev/null ./pg_regress: line 503: 9007 Bus error $bindir/psql - X $psql_options postgres /dev/null 2/dev/null

Re: [GENERAL] Bus error on make check

2006-02-20 Thread Jonel Rienton
Usually bus error is cause by bad memory, haven't seen this kind of error in a long time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Hall Sent: Monday, February 20, 2006 1:44 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Bus error on

[GENERAL] Performance Problems

2006-02-20 Thread Warren
I have one table that gets slower and slower over time. It has a lot of UPDATES INSERTS and DELETES run on it. It may have as many as 20,000 rows at any given time. I am running autovacuum using the following command line: /usr/local/pgsql/bin/pg_autovacuum -D -s -S -L

Re: [GENERAL] Bus error on make check

2006-02-20 Thread Doug Hall
Nevermind. It was a configuration error. I thought I'd get smart by using /usr/local instead of the default libraries and includes. Once I reverted back to the defaults, all went well. Thanks anyway!Doug

Re: [GENERAL] Performance Problems

2006-02-20 Thread Matthew T. O'Connor
Are you sure that is the exact command line you are using for autovacuum? I'm not sure it will work like that, I believe the the -s and -S options require a value to be given. Anyway, a few things you can do. It sounds like the table isn't getting vacuumed frequently enough for you, you

Re: [GENERAL] Performance Problems

2006-02-20 Thread Scott Marlowe
On Mon, 2006-02-20 at 14:12, Warren wrote: I have one table that gets slower and slower over time. It has a lot of UPDATES INSERTS and DELETES run on it. It may have as many as 20,000 rows at any given time. I am running autovacuum using the following command line:

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-20 Thread Greg Stark
Martijn van Oosterhout kleptog@svana.org writes: On Sat, Feb 18, 2006 at 08:16:07PM -0800, Bill Moseley wrote: Is the Holy Grail encoding and lc_collate settings per column? By way of example, see ICU which is an internationalisation library we're considering to get consistant locale

[GENERAL] Question about COPY to/from

2006-02-20 Thread Emi Lu
Hello, We have millions of record and would like to insert into a table. I remebered people mentioned that COPY is the most effecient way to insert data, right? If not, which is it, pg_restore? By the way, does it have to be superuser to run copy to and from? Thanks a lot, Emi

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Martijn van Oosterhout
On Mon, Feb 20, 2006 at 05:08:33AM -0800, Chad wrote: 4. Why I think I need to work at this level of abstraction. I believe, certain types of queries can be realized more efficiently by code that can seek to specific parts of an index and immediately returning a small number of rows to the

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Scott Marlowe
On Mon, 2006-02-20 at 16:40, Martijn van Oosterhout wrote: On Mon, Feb 20, 2006 at 05:08:33AM -0800, Chad wrote: 4. Why I think I need to work at this level of abstraction. I believe, certain types of queries can be realized more efficiently by code that can seek to specific parts of an

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-20 Thread Martijn van Oosterhout
On Mon, Feb 20, 2006 at 05:30:06PM -0500, Greg Stark wrote: Martijn van Oosterhout kleptog@svana.org writes: By way of example, see ICU which is an internationalisation library we're considering to get consistant locale support over all platforms. It supports one encoding, namely UTF-16. It

Re: [GENERAL] Question about COPY to/from

2006-02-20 Thread Stephen Frost
* Emi Lu ([EMAIL PROTECTED]) wrote: We have millions of record and would like to insert into a table. I remebered people mentioned that COPY is the most effecient way to insert data, right? If not, which is it, pg_restore? By the way, does it have to be superuser to run copy to and from?

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-20 Thread Tatsuo Ishii
On Sat, Feb 18, 2006 at 08:16:07PM -0800, Bill Moseley wrote: Is the Holy Grail encoding and lc_collate settings per column? Well yes. I've been trying to create a system where you can handle multiple collations in the same database. I posted the details to -hackers and got part of the

Re: [GENERAL] How to specify infinity for intervals ?

2006-02-20 Thread Michael Glaesemann
On Feb 21, 2006, at 3:24 , Karsten Hilbert wrote: I am storing the maximum age a vaccination is due in a patient (eg. don't give this vaccination beyond the age of 10 years or some such). Some vaccinations are to be given regardless of age. Up to now I have used NULL to mean no maximum age.

Re: [GENERAL] How to determine number of established connections

2006-02-20 Thread Michael Fuhr
On Mon, Feb 20, 2006 at 09:33:57PM +0200, Andrus wrote: I want to licence my application per-connection basic. Ugh. A lot of people here aren't going to be interested in helping with that. I can assume that Postgres 8.1 database or even a whole cluster is accessed only by my application or

[GENERAL] [PATCH] ipv6 support for getaddrinfo.c

2006-02-20 Thread R, Rajesh (STSD)
Patch for getaddrinfo.c to recognize ipv6 addresses.Used inet_pton to achieve that.On machines that dont have getaddrinfo function, Client authenciation failsfor ipv6 addresses if pgsql uses getaddrinfo implemented in this.This is a fix for that.Rajesh R--This space intentionally left

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-20 Thread Martijn van Oosterhout
On Tue, Feb 21, 2006 at 10:27:15AM +0900, Tatsuo Ishii wrote: If you consider to allow only UTF-16 or whatever encoding in backend, I will strongly against the idea. We Japanese need those encodings native support. Converting those encodings with Unicode everytime when backend and forntend