Re: [SQL] i am getting error when i am using copy command

2006-05-03 Thread Markus Schaber
Hi, Penchalaiah, Penchalaiah P. wrote: > Copy penchal to ‘/tmp/penchal.out’ > > When I am using this statement I am getting error is : could not open > file ‘/tmp/penchal.out’ for writing: no such file or directory.. It seems that the /tmp directory is missing from your system. This can hav

Re: [SQL] Compute hash of a table?

2006-05-03 Thread Markus Schaber
Hi, Peter, Peter Manchev wrote: > Is it possible to get the last time(stamp) when the content of a given > table in pgsql has changed??? My solution would be to add a trigger to the table which updates a timestamp in a second table on every insert/update/delete. HTH, Markus -- Markus Schab

[SQL] selects on differing subsets of a query

2006-05-03 Thread ed . temp . 01
First post, be gentle as I have terminology problems and so the subject might be wrongly worded. Say I have a table with fields ... gender diet_pref ... What I am trying to construct is a *single* query showing the total number of males in the table and also the total number of male vegetarians

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread Markus Schaber
Hi, Ed Temp, [EMAIL PROTECTED] wrote: > First post, be gentle as I have terminology problems and so the > subject might be wrongly worded. Hmm, the biggest mistake seems that "et temp 01" is a very unlikely real name, so you should reconfigure your mail client :-) > What I am trying to construc

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread ed . temp . 01
Hello Markus, It's actually a temporary mailbox just in case the list attracts spam :-) Thank you for your help, I will study it when I get development time on the database. On 03/05/06, Markus Schaber <[EMAIL PROTECTED]> wrote: Hi, Ed Temp, [EMAIL PROTECTED] wrote: > First post, be gentle a

Re: [SQL] ERROR: plan should not reference subplan's variable

2006-05-03 Thread Andrew Sullivan
On Wed, May 03, 2006 at 08:08:22AM +0300, Catalin Pitis wrote: > Hi Tom > > Could you tell me when will 8.1.4 be released with the problem solved? In general, you can't rely on hard release dates in a free software project. Given that's in the STABLE branch, however, you could get it directly fr

Re: [SQL] i am getting error when i am using copy command

2006-05-03 Thread Andrew Sullivan
On Wed, May 03, 2006 at 10:02:37AM +0200, Markus Schaber wrote: > > file ?/tmp/penchal.out? for writing: no such file or directory.. > > It seems that the /tmp directory is missing from your system. Right. And notice that the "your system" here is the _server_, not the machine you're running p

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread Markus Schaber
Hi, Ed, [EMAIL PROTECTED] wrote: > It's actually a temporary mailbox just in case the list attracts spam :-) As far as I can see, the PostgreSQL lists are extremely low on spam attraction, compared to other lists. I think this is a result of the "only subscribers may post" policy, but I'm getti

Re: [SQL] i am getting error when i am using copy command

2006-05-03 Thread Ben K.
file '/tmp/penchal.out' for writing: no such file or directory.. _IF_ you're on linux it could be due to selinux. setenforce 0 might solve the problem tempoarily. I would assume there should've been some existing discussion threads. (setenforce 1 afterwards.) Regards, Ben K. -

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread Bruno Wolff III
On Wed, May 03, 2006 at 14:19:27 +0200, Markus Schaber <[EMAIL PROTECTED]> wrote: > > I think this is a result of the "only subscribers may post" policy, but > I'm getting of topic. Note the policy is really only subscribers may post without moderator approval. ---(end

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread Bruno Wolff III
On Wed, May 03, 2006 at 09:47:49 +0100, [EMAIL PROTECTED] wrote: > First post, be gentle as I have terminology problems and so the > subject might be wrongly worded. > > Say I have a table with fields > ... > gender > diet_pref > ... > > What I am trying to construct is a *single* query showing

Re: [SQL] Sorting aggregate column contents

2006-05-03 Thread Everton Luís Berz
Thanks a lot the explanation. I tested all cases and I noticed that reordering the source table (city) not works on all cases, so I think Postgresql perform different internal sort to optimize some query's. I noticed this in other query I performed: select s.ano, s.semestre,

Re: [SQL] selects on differing subsets of a query

2006-05-03 Thread Markus Schaber
Hi, Bruno, Bruno Wolff III wrote: >>I think this is a result of the "only subscribers may post" policy, but >>I'm getting of topic. > > Note the policy is really only subscribers may post without moderator > approval. Thanks for clarification. I also think that the moderators are aided by som

Re: [SQL] Sorting aggregate column contents

2006-05-03 Thread Everton Luís Berz
People from brazilian postgresql list sent me another way to sort the column contents. The way is the aggregate accumulate values and after run an array sort function. It worked fine. I think the subquery in function f_select_array does not decrease performance. Follow the code: --from http://arc