Re: [GENERAL] DISTINCT ON without ORDER BY

2009-04-22 Thread Martijn van Oosterhout
On Tue, Apr 21, 2009 at 12:11:26PM +, Jasen Betts wrote: Is there a way to acheive the above result without a sort and without a self-join? anyway you could possibly write an agregate function that returns a copy of the row with the highest id? Put that way it sounds like something

[GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-22 Thread Emi Lu
Good morning, My daily data population cronjob(around 1 hour) terminated at the middle and raised the following error this morning: Connection rejected: FATAL: Ident authentication failed for user schema_owner_name. Could anyone tell me what might cause the problem please? Thanks a lot!

Re: [GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-22 Thread Grzegorz Jaśkiewicz
On Wed, Apr 22, 2009 at 2:36 PM, Emi Lu em...@encs.concordia.ca wrote: Good morning, My daily data population cronjob(around 1 hour) terminated at the middle and raised the following error this morning: Connection rejected: FATAL: Ident authentication failed for user schema_owner_name.

Re: [GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-22 Thread John Cheng
Check your pg_hba.conf file. What does it look like? The message suggests that your job is trying to connect to the database as the user schema_owner_name (or whatever the real user name is), but is actually running as a different unix user. Also, did anyone change the unix user running this

Re: [GENERAL] Yet another drop table vs delete question

2009-04-22 Thread Thomas Finneid
Alvaro Herrera wrote: Try TRUNCATE. That leaves the less garbage behind and takes the less time. A follow up question, as far as I understand it, delete removes entries in the fsm, so vacuum has to clean it all up when performing a delete, is this approximately correct? what happens with

[GENERAL] Reg: Logging log_min_duration_statement

2009-04-22 Thread S Arvind
I set log_min_duration_statement to 1 and restart the postgres. But when i check the tail to log i am getting all queries. please tell is it bug ? i have log_statement = all . is there any relation between this and min_duaration? Arvind S * Many of lifes failure are people who did not

Re: [GENERAL] Reg: Logging log_min_duration_statement

2009-04-22 Thread Scott Mead
On Wed, Apr 22, 2009 at 9:16 AM, S Arvind arvindw...@gmail.com wrote: I set log_min_duration_statement to 1 and restart the postgres. But when i check the tail to log i am getting all queries. please tell is it bug ? i have log_statement = all . is there any relation between this and

Re: [GENERAL] Reg: Logging log_min_duration_statement

2009-04-22 Thread A. Kretschmer
In response to S Arvind : I set log_min_duration_statement to 1 and restart the postgres. But when i check the tail to log i am getting all queries. please tell is it bug ? i have log_statement = all . is there any relation between this and min_duaration? log_statement = all loggs _all_

[GENERAL] Help request to improve function performance

2009-04-22 Thread sarikan
Dear members of the list, I have a function which returns a custom type, that has only two fields, each of them being varchar arrays. The reason that I have written this function is that I have a table basically with the following structure (with simplified column names) name_col1 name_col2

[GENERAL] Dynamic SQL in Function

2009-04-22 Thread rwade
If I have built a dynamic sql statement in a function, how do i return it as a ref cursor? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] From 8.1 to 8.3

2009-04-22 Thread S Arvind
Our company wants to move from 8,1 to 8.3 latest. In irc they told me to check realse notes for issues while upgrading. But there are lots of release notesss. Can anyone tell some most noticable change or place-of-error while upgrading? Arvind S * Many of lifes failure are people who did not

Re: [GENERAL] From 8.1 to 8.3

2009-04-22 Thread Alvaro Herrera
S Arvind escribió: Our company wants to move from 8,1 to 8.3 latest. In irc they told me to check realse notes for issues while upgrading. But there are lots of release notesss. Can anyone tell some most noticable change or place-of-error while upgrading? If you're too lazy to read them,

Re: [GENERAL] From 8.1 to 8.3

2009-04-22 Thread Joao Ferreira gmail
On Wed, 2009-04-22 at 22:12 +0530, S Arvind wrote: Our company wants to move from 8,1 to 8.3 latest. In irc they told me to check realse notes for issues while upgrading. But there are lots of release notesss. Can anyone tell some most noticable change or place-of-error while upgrading? one I

Re: [GENERAL] From 8.1 to 8.3

2009-04-22 Thread Joshua D. Drake
On Wed, 2009-04-22 at 12:49 -0400, Alvaro Herrera wrote: S Arvind escribió: Our company wants to move from 8,1 to 8.3 latest. In irc they told me to check realse notes for issues while upgrading. But there are lots of release notesss. Can anyone tell some most noticable change or

[GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
When trying to upgrade Postgres I got this message: The existing data directory (Date/time settings: floating -point numbers) is not compatible with this server (Date/Time setting: 64-bit integers) I saw a few posts about this but I'm still not sure how to fix it. I think one of them said I

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 16:57, Christine Penner wrote: The existing data directory (Date/time settings: floating -point numbers) is not compatible with this server (Date/Time setting: 64-bit integers) I saw a few posts about this but I'm still not sure how to fix it. I think one of them said I need

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Joshua D. Drake
On Wed, 2009-04-22 at 18:09 +0100, Raymond O'Donnell wrote: On 22/04/2009 16:57, Christine Penner wrote: The existing data directory (Date/time settings: floating -point numbers) is not compatible with this server (Date/Time setting: 64-bit integers) I saw a few posts about this but

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
I am upgrading from 8.3.4 to 8.3.7. That's why I'm confused. The notes said I wouldn't have to do that. 8.3.4 was the original install. Christine At 10:09 AM 22/04/2009, you wrote: On 22/04/2009 16:57, Christine Penner wrote: The existing data directory (Date/time settings: floating -point

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 18:12, Joshua D. Drake wrote: On Wed, 2009-04-22 at 18:09 +0100, Raymond O'Donnell wrote: It sounds as if you're trying to get a later-version server to use an earlier-version data directory - this won't work. Actually the error is about whether or not the server was compiled

Re: [GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-22 Thread Scott Marlowe
On Wed, Apr 22, 2009 at 7:36 AM, Emi Lu em...@encs.concordia.ca wrote: Good morning, My daily data population cronjob(around 1 hour) terminated at the middle and raised the following error this morning: Connection rejected: FATAL: Ident authentication failed for user schema_owner_name.

[GENERAL] Testing ... please reply

2009-04-22 Thread Atul Chojar
Could someone reply to this email? I am testing my subscription; joined over 2 months ago, but never get any response to questions Thanks! Atul -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Joshua D. Drake Sent:

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Mikko
On Wed, Apr 22, 2009 at 2:13 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Ouch ... I thought that was the way that Windows designated UTF8 locales, but maybe I am wrong. Ok, now I found out that Windows doesn't support locales with encoding using more than two bytes per character and

Re: [GENERAL] Testing ... please reply

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 18:21, Atul Chojar wrote: Could someone reply to this email? I am testing my subscription; joined over 2 months ago, but never get any response to questions Receiving you loud and clear! Ray. -- Raymond O'Donnell,

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
Windows XP pro. I went to the postgres web site, downloads, clicked on the binary package and selected windows. It gave me a file called Postgresql-8.3.7-1-windows.exe When I run that I hit next for the postgres directory, then after hitting next for the data directory I get the error. I kept

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Joshua D. Drake
On Wed, 2009-04-22 at 10:31 -0700, Christine Penner wrote: Windows XP pro. I went to the postgres web site, downloads, clicked on the binary package and selected windows. It gave me a file called Postgresql-8.3.7-1-windows.exe When I run that I hit next for the postgres directory, then

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Joshua D. Drake
On Wed, 2009-04-22 at 10:13 -0700, Christine Penner wrote: I am upgrading from 8.3.4 to 8.3.7. That's why I'm confused. The notes said I wouldn't have to do that. 8.3.4 was the original install. What OS are you running? How did you go about upgrading? Debian/Ubuntu will use

Re: [GENERAL] Testing ... please reply

2009-04-22 Thread Joao Ferreira
Coming loud and clear ! joao On Wed, 2009-04-22 at 13:21 -0400, Atul Chojar wrote: Could someone reply to this email? I am testing my subscription; joined over 2 months ago, but never get any response to questions Thanks! Atul -Original Message- From:

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Alvaro Herrera
Mikko escribió: On Wed, Apr 22, 2009 at 2:13 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Ouch ... I thought that was the way that Windows designated UTF8 locales, but maybe I am wrong. Ok, now I found out that Windows doesn't support locales with encoding using more than two

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Thomas Kellerer
Joshua D. Drake wrote on 22.04.2009 19:34: Huh, I wonder when the windows package changed its defaults. Could it be that Christine initially installed the pginstaller version, and now downloaded the EnterpriseDB installer? And EnterpriseDB compiles with a different default setting? As far

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 19:00, Thomas Kellerer wrote: Could it be that Christine initially installed the pginstaller version, and now downloaded the EnterpriseDB installer? And EnterpriseDB compiles with a different default setting? As far as I recall the .exe is the EnterpriseDB One-Click-Installer.

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
It was a zip file with an msi installer in it. I tried to find a similar one for the update but all I could find was the one click installer. Christine At 11:00 AM 22/04/2009, you wrote: Joshua D. Drake wrote on 22.04.2009 19:34: Huh, I wonder when the windows package changed its defaults.

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Tom Lane
Christine Penner christ...@ingenioussoftware.com writes: Windows XP pro. I went to the postgres web site, downloads, clicked on the binary package and selected windows. It gave me a file called Postgresql-8.3.7-1-windows.exe There are different people distributing Postgres-for-Windows with

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Tom Lane
Joshua D. Drake j...@commandprompt.com writes: RedHat/Cent/Fedora has long used the incorrect default of floating based timestamps. Josh, you're being extremely unhelpful by presenting the problem in this narrow minded correct vs incorrect way. I'm going to go on the record now that if Bruce

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 19:05, Christine Penner wrote: It was a zip file with an msi installer in it. I tried to find a similar one for the update but all I could find was the one click installer. The initial installation sounds like it was the pgInstaller, so. It would be worth trying again with the

Re: [GENERAL] thanks for the testing replies ; now my first question - Logs say update done but not actually done or committed into database

2009-04-22 Thread Atul Chojar
Thanks to everyone who replied to the test email! Now for my real question:- We are facing a strange problem in our 8.2.7 database. There is a bash shell script that does:- sql=”select distinct to_char(date_of_issue, ‘MM’) from yan.int_prod_s_master order by 1;”

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
The link below takes me to the same place I got this installer I'm having problems with. I am pretty sure I got the original installer from the Postgres web site just like I just did. Christine At 11:14 AM 22/04/2009, you wrote: On 22/04/2009 19:05, Christine Penner wrote: It was a zip file

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Bruce Momjian
Tom Lane wrote: Joshua D. Drake j...@commandprompt.com writes: RedHat/Cent/Fedora has long used the incorrect default of floating based timestamps. Josh, you're being extremely unhelpful by presenting the problem in this narrow minded correct vs incorrect way. I'm going to go on the

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Raymond O'Donnell
On 22/04/2009 19:21, Christine Penner wrote: The link below takes me to the same place I got this installer I'm having problems with. I am pretty sure I got the original installer from Well, there are two installers listed there (at least, that's what I see): * One-click installer, on

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Christine Penner
Looks like that's the one I got last time. They must have had that one list on the main download page when I did the original install. I wouldn't have looked in the ftp section. Also when I looked in the ftp section earlier today, I skipped the binary stuff because the one click installer I

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Does this imply that we shouldn't allow UTF8 database on Windows at all? That would be pretty unfortunate :-( I think what this suggests is that there probably needs to be some encoding conversion logic near the places we examine localeconv()

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Thomas Kellerer
Raymond O'Donnell wrote on 22.04.2009 20:14: On 22/04/2009 19:05, Christine Penner wrote: It was a zip file with an msi installer in it. I tried to find a similar one for the update but all I could find was the one click installer. The initial installation sounds like it was the pgInstaller,

Re: [GENERAL] Dynamic SQL in Function

2009-04-22 Thread Merlin Moncure
On Wed, Apr 22, 2009 at 12:29 PM, rw...@uci.edu wrote: If I have built a dynamic sql statement in a function, how do i return it as a ref cursor? CREATE FUNCTION reffunc(_ref) RETURNS refcursor AS $$ BEGIN OPEN _ref FOR execute 'SELECT * from foo'; RETURN _ref; END; $$ LANGUAGE

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Thomas Kellerer
Bruce Momjian wrote on 22.04.2009 20:26: Yes, I can confirm I think pg_migrator will work for 8.3-8.4 upgrades; I start testing this week. This is pretty good news, cool. Will there be Windows binaries for the pg_migrator once that 8.4 ships? Thomas -- Sent via pgsql-general mailing list

Re: [GENERAL] Dynamic SQL in Function

2009-04-22 Thread Merlin Moncure
n Wed, Apr 22, 2009 at 2:54 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Apr 22, 2009 at 12:29 PM,  rw...@uci.edu wrote: If I have built a dynamic sql statement in a function, how do i return it as a ref cursor? CREATE FUNCTION reffunc(_ref) RETURNS refcursor AS oops CREATE FUNCTION

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Dave Page
On Wed, Apr 22, 2009 at 7:54 PM, Thomas Kellerer spam_ea...@gmx.net wrote: I still wonder why the one-click installer is so much more prominent than the pginstaller. Because it was designed to remove many of the complexities of the MSI installer that most users don't need and many don't

Re: [GENERAL] Error installing Postgres

2009-04-22 Thread Bruce Momjian
Thomas Kellerer wrote: Bruce Momjian wrote on 22.04.2009 20:26: Yes, I can confirm I think pg_migrator will work for 8.3-8.4 upgrades; I start testing this week. This is pretty good news, cool. Will there be Windows binaries for the pg_migrator once that 8.4 ships? Uh, no idea on

Re: [GENERAL] thanks for the testing replies ; now my first question - Logs say update done but not actually done or committed into database

2009-04-22 Thread Filip Rembiałkowski
2009/4/22 Atul Chojar acho...@airfacts.com We are facing a strange problem in our 8.2.7 database. There is a bash shell script that does:- sql=”select distinct to_char(date_of_issue, ‘MM’) from yan.int_prod_s_master order by 1;” MM=`/usr/local/pgsql/bin/psql -U postgres -h payday

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread Filip Rembiałkowski
2009/4/22 sarikan serefari...@kurumsalteknoloji.com Dear members of the list, I have a function which returns a custom type, that has only two fields, each of them being varchar arrays. The reason that I have written this function is that I have a table basically with the following

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Hiroshi Inoue
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Does this imply that we shouldn't allow UTF8 database on Windows at all? That would be pretty unfortunate :-( I think what this suggests is that there probably needs to be some encoding conversion logic near the places we

[GENERAL] how to search for relation by name?

2009-04-22 Thread zach cruise
when i try to copy database (into another database), i get relation does not exist errors for 'super objects' like sequences. (that is fine since i am using pg_dump, not pg_dumpall) but there is one relation i can't find to recreate in the new database. how can i search database for relation by

Re: [GENERAL] how to search for relation by name?

2009-04-22 Thread DM
Here is the sql SELECT c.oid, n.nspname, c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relname LIKE ('%dt%') AND pg_catalog.pg_table_is_visible(c.oid) replace dt with your sequence name pg_catalog has the information.

Re: [GENERAL] Yet another drop table vs delete question

2009-04-22 Thread Erik Jones
On Apr 22, 2009, at 8:04 AM, Thomas Finneid wrote: Alvaro Herrera wrote: Try TRUNCATE. That leaves the less garbage behind and takes the less time. A follow up question, as far as I understand it, delete removes entries in the fsm, so vacuum has to clean it all up when performing a

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread Seref Arikan
Hi Filip, First of all: thanks a lot for your kind response. Here is the create script for my schema: CREATE TABLE app.archetype_data ( id BIGINT NOT NULL, context_id VARCHAR(1000), archetype_name VARCHAR(1000), archetype_path VARCHAR(1000), name VARCHAR(1000), value_string

[GENERAL] how to revoke multiple users permission from multiple tables at the same time?

2009-04-22 Thread DM
how to revoke multiple users permission from multiple tables at the same time? Or in simple is there a way to revoke multiple users grant access from multiple tables under a schema.? I use Revoke below command to execute on each table one by one. revoke SELECT/ALL on testtable from user1;

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread Grzegorz Jaśkiewicz
you keep everything in varchars, and yet you request improvements in performance. you are a funny guy, ... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Re: [ADMIN] how to revoke multiple users permission from multiple tables at the same time?

2009-04-22 Thread Scott Marlowe
On Wed, Apr 22, 2009 at 4:19 PM, DM dm.a...@gmail.com wrote: how to revoke multiple users permission from multiple tables at the same time? Or in simple is there a way to revoke multiple users grant access from multiple tables under a schema.? Best way is to NOT grant multiple users

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread Seref Arikan
Hi there, I have a set of dynamically composed objects represented in Java, with string values for various attributes, which have variable length. In case you have suggestions for a better type for this case, it would be my pleasure to hear about them. 2009/4/22 Grzegorz Jaśkiewicz

[GENERAL] Re: [ADMIN] how to revoke multiple users permission from multiple tables at the same time?

2009-04-22 Thread Scott Marlowe
On Wed, Apr 22, 2009 at 5:01 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Wed, Apr 22, 2009 at 4:19 PM, DM dm.a...@gmail.com wrote: how to revoke multiple users permission from multiple tables at the same time? Or in simple is there a way to revoke multiple users grant access from

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread Scott Marlowe
2009/4/22 Seref Arikan serefari...@kurumsalteknoloji.com: Hi Filip, First of all: thanks a lot for your kind response. Here is the create script for my schema: CREATE TABLE app.archetype_data (   id BIGINT NOT NULL,   context_id VARCHAR(1000),   archetype_name VARCHAR(1000),  

[GENERAL] Re: [ADMIN] how to revoke multiple users permission from multiple tables at the same time?

2009-04-22 Thread DM
Thanks Scott. Good answer, I was consolidating the schemas here, there were too many users were granted permission to tables.I wanted to consolidate/optimize to bring it to one role and granting this role to the user (same way as you mentioned). Thanks for the solution. Thanks Deepak On Wed,

Re: [GENERAL] Problem with pgpool-II tool

2009-04-22 Thread Tatsuo Ishii
The error message says all. Pgpool process needs to create /var/run/pgpool/pgpool.pid when starting up. So you should give pgpool write access right to the directory(/var/run/pgpool/), and of courese along with access right to reach the directory. -- Tatsuo Ishii SRA OSS, Inc. Japan Hello,

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread John R Pierce
Seref Arikan wrote: I have a set of dynamically composed objects represented in Java, with string values for various attributes, which have variable length. In case you have suggestions for a better type for this case, it would be my pleasure to hear about them. cut out about 3 layers of