Re: [GENERAL] PQntuples return type

2007-09-27 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: This is silly. Have you forgotten that the max number of columns is constrained to 1600 on the backend side? Uh, this is the number of returned rows, right? How does this relate to columns? Duh, brain fade on

Re: [GENERAL] datestyle question

2007-09-27 Thread Alban Hertroys
Diego Gil wrote: Hi, I have a file to import to postgresql that have an unusual date format. For example, Jan 20 2007 is 20022007, in DDMM format, without any separator. I know that a 20072002 (MMDD) is ok, but I don't know how to handle the DDMM dates. You could try importing

Re: [GENERAL] Performance Issues

2007-09-27 Thread Peter Childs
On 23/09/2007, Alvaro Herrera [EMAIL PROTECTED] wrote: Christian Schröder wrote: Alvaro Herrera wrote: Christian Schröder wrote: I think it is my job as db admin to make the database work the way my users need it, and not the user's job to find a solution that fits the database's

[GENERAL] Find smallest common year

2007-09-27 Thread Stefan Schwarzer
Hi there, my aim is to plot a line graph for a single country but for two or three variables. Now, one could use two different y-axis (if there are two data sets with different units); but it's not really the right way to analyse data. One should rather normalize them to a base year to enhance

Re: [GENERAL] Find smallest common year

2007-09-27 Thread William Leite Araújo
If I understood your question, maybe it's you want: SELECT min(desired data) FROM table1 JOIN table2 ON (table1.data_field= table2.data_field); 2007/9/27, Stefan Schwarzer [EMAIL PROTECTED]: Hi there, my aim is to plot a line graph for a single country but for two or three variables.

Re: [GENERAL] Find smallest common year

2007-09-27 Thread Stefan Schwarzer
Sorry, I forgot to mention my table design, which is like this: name 20012002 2003 2004 2005 - Afghanistan Albania (Yep, I know, bad table design :-)). I tried to change it

Re: [GENERAL] Find smallest common year

2007-09-27 Thread Carlos Moreno
Stefan Schwarzer wrote: Sorry, I forgot to mention my table design, which is like this: name 20012002 2003 2004 2005 - Afghanistan Albania (Yep, I know, bad table design

Re: [GENERAL] pg_dump (8.1.9) does not output copy statements

2007-09-27 Thread Jan de Visser
On Thursday 27 September 2007 00:38:15 Tom Lane wrote: Jan de Visser [EMAIL PROTECTED] writes: In my world two identical pilot errors within a short timeframe are indicat= ive=20 of a bad interface. Yeah, it's inconsistent.  How many people's dump scripts do you want to break to make it

[GENERAL] How unsubscrib this list ?

2007-09-27 Thread Gerson Machado
How unsubscrib this list ? Flickr agora em português. Você clica, todo mundo vê. Saiba mais.

[GENERAL] TSearch - Bulgarian

2007-09-27 Thread Hristo Filipov
Hello world! J!! We are Bulgarian developers currently working on some web project(server must run on windows and linux) and we stop our choice for database at PostgreSQL, which I may say offers great things at no cost at all :-P. So we have our tables ready after some times (new for psql,

Re: [GENERAL] How unsubscrib this list ?

2007-09-27 Thread Bill Moran
In response to Gerson Machado [EMAIL PROTECTED]: How unsubscrib this list ? Flickr agora em português. Você clica, todo mundo vê. Saiba mais. The information is in the mail headers: List-Archive: http://archives.postgresql.org/pgsql-general List-Help: mailto:[EMAIL PROTECTED] List-ID:

Re: [GENERAL] TSearch - Bulgarian

2007-09-27 Thread Christian Rengstl
You might have to create a Bulgarian dictionary first before you will be able to successfully use tsearch. Maybe some information here will help you: http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ Christian Rengstl M.A. Klinik und Poliklinik für Innere Medizin II Kardiologie - Forschung

[GENERAL] access privileges: grant select on (all current and future tables)?

2007-09-27 Thread John Smith
how'd i grant select on (all current and future tables inside a private schema) to username without turning that user into superuser? grant usage on... doesn't do it. or do i, everytime i batch/auto create the tables, do a grant select on (new table) to username?

[GENERAL] Re: Why the ERROR: duplicate key violates unique constraint master_pkey is raised? - Is this a Bug?

2007-09-27 Thread Nis Jørgensen
Ardian Xharra skrev: *From:* Anoo Sivadasan Pillai mailto:[EMAIL PROTECTED] I am not using any sequences, The following batch can reproduce the behaviour. CREATE TABLE master ( m1 INT primary key , m2 int unique ) ; INSERT INTO master VALUES ( 1, 1 ) ; INSERT INTO master VALUES ( 2, 2)

Re: [GENERAL] Find smallest common year

2007-09-27 Thread Stefan Schwarzer
I really tried it out. I changed my whole database to the id-country | year | value - format. And then tried to build my SQL queries. But it was really, really difficult, and sometimes impossible (for me) to get what I wanted. Actually, it remains quite difficult for me to remember the

[GENERAL] Getting the search_path value for a query listed in pg_stat_activity output (feature request?)

2007-09-27 Thread Aleksander Kmetec - INTERA
Hi, all. Is there a way to find out which search_path a query is using? I have around 100 schemas, each of them containing the same set of tables. When the app connects it sets the search_path and then doesn't use the schema name anywhere again, which means that it's impossible to see which

Re: [GENERAL] Find smallest common year

2007-09-27 Thread Scott Marlowe
On 9/27/07, Stefan Schwarzer [EMAIL PROTECTED] wrote: I really tried it out. I changed my whole database to the id-country | year | value - format. And then tried to build my SQL queries. But it was really, really difficult, and sometimes impossible (for me) to get what I wanted. Actually,

Re: [GENERAL] DAGs and recursive queries

2007-09-27 Thread Jeff Davis
On Wed, 2007-09-26 at 16:54 +0100, Gregory Stark wrote: paul.dorman [EMAIL PROTECTED] writes: Hi everyone, I would like to know the best way to implement a DAG in PostgreSQL. I understand there has been some talk of recursive queries, and I'm wondering if there has been much progress

Re: [GENERAL] access privileges: grant select on (all current and future tables)?

2007-09-27 Thread John Smith
On 9/27/07, John Smith [EMAIL PROTECTED] wrote: how'd i grant select on (all current and future tables inside a private schema) to username without turning that user into superuser? grant usage on... doesn't do it. or do i, everytime i batch/auto create the tables, do a grant select on (new

Re: [GENERAL] pg_dump (8.1.9) does not output copy statements

2007-09-27 Thread Matthew Dennis
All of them On 9/26/07, Tom Lane [EMAIL PROTECTED] wrote: Jan de Visser [EMAIL PROTECTED] writes: In my world two identical pilot errors within a short timeframe are indicat= ive=20 of a bad interface. Yeah, it's inconsistent. How many people's dump scripts do you want to break to

[GENERAL] question about pg_dump -a

2007-09-27 Thread Ottavio Campana
I have a database which I create using dia and tedia2sql. I developed another version with more tables, without changing anything that was already present in the first version. Now I want to copy the data from one database to another, so I thought about pg_dump -a, assuming that since there is

Re: [GENERAL] DAGs and recursive queries

2007-09-27 Thread Gregory Stark
Jeff Davis [EMAIL PROTECTED] writes: On Wed, 2007-09-26 at 16:54 +0100, Gregory Stark wrote: You could check out the tablefunc contrib which includes a function called connectby() which implements a kind of recursive query. Alternatively you might look at the ltree contrib module but that

[GENERAL] usage of indexes for inner joins

2007-09-27 Thread Jan Theodore Galkowski
I fear this has been asked many times about PostgreSQL, and I have read the docs about how indexes are supposed to be defined and used, but I don't understand why the engine and optimizer is doing what it does in the simplest of situations. Is it that its tuning is heavily data dependent? My

Re: [GENERAL] usage of indexes for inner joins

2007-09-27 Thread Tom Lane
Jan Theodore Galkowski [EMAIL PROTECTED] writes: Total runtime: .169 ms ; Like *how* *come*? You have a problem with 0.1 ms runtime? But to correct your obvious misunderstanding: yes, the plan depends on the table size, as well it should. regards, tom lane