Re: [GENERAL] [ADMIN] Priorities for users or queries?

2007-02-11 Thread Andreas Kretschmer
Edwin Eyan Moragas [EMAIL PROTECTED] schrieb: On 2/11/07, Benjamin Arai [EMAIL PROTECTED] wrote: Hi, Is there a way to give priorities to queries or users? Something similar to NICE in Linux. My goal is to give the updating (backend) application a very low priority and give the web

Re: [GENERAL] [ADMIN] Priorities for users or queries?

2007-02-11 Thread Edwin Eyan Moragas
On 2/11/07, Benjamin Arai [EMAIL PROTECTED] wrote: Hi, Is there a way to give priorities to queries or users? Something similar to NICE in Linux. My goal is to give the updating (backend) application a very low priority and give the web application a high priority to avoid disturbing the user

Re: [GENERAL] [ADMIN] Priorities for users or queries?

2007-02-11 Thread Benjamin Arai
Hi Edwin, Which connection parameters effect system resources? Benjamin Edwin Eyan Moragas wrote: On 2/11/07, Benjamin Arai [EMAIL PROTECTED] wrote: Hi, Is there a way to give priorities to queries or users? Something similar to NICE in Linux. My goal is to give the updating (backend)

Re: [GENERAL] Priorities for users or queries?

2007-02-11 Thread Magnus Hagander
Most likely, you do not want to do this. You *can* do it, but you are quite likely to suffer from priority inversion (http://en.wikipedia.org/wiki/Priority_inversion) //Magnus Adam Rich wrote: There is a function pg_backend_pid() that will return the PID for the current session. You could

Re: [GENERAL] Adding TEXT columns tanks performance?

2007-02-11 Thread Arturo Perez
On Feb 10, 2007, at 12:34 PM, Tom Lane wrote: Arturo Perez [EMAIL PROTECTED] writes: Saturday I changed a table to add a varchar(24) and a TEXT column. You didn't actually say which of these tables you changed? Sorry, I changed extended_user. I'm not very good at reading these but it

Re: [GENERAL] MOVE cursor in plpgsql?

2007-02-11 Thread Tomas Vondra
Hi all, Is there a way to move a cursor in plpgsql in the same way as in regular sql? The function below would like to move the cursor back to the start each time the cursor runs out of rows, creating pairs of integers that are randomly put together. The motivation for this is to

Re: [GENERAL] Adding TEXT columns tanks performance?

2007-02-11 Thread Arturo Perez
On Feb 10, 2007, at 12:34 PM, Tom Lane wrote: Arturo Perez [EMAIL PROTECTED] writes: Saturday I changed a table to add a varchar(24) and a TEXT column. You didn't actually say which of these tables you changed? I'm not very good at reading these but it looks like sort memory might be

[GENERAL] How to preserve characters with accent?

2007-02-11 Thread dfx
Dear sirs, I have some fiel name with character with accent (à, ò...) but when I make a plain backup of schema (file.sql) that characters are converted to strange sequence of two (or more?) characters. How I can avoid this? Thank you in advance. Domenico ---(end of

Re: [GENERAL] MOVE cursor in plpgsql?

2007-02-11 Thread Webb Sprague
Is there a way to move a cursor in plpgsql in the same way as in regular sql? ... Wouldn't it be easier to list the parts in a random order (simply ORDER BY RANDOM()) and then use modulo by number of actors (but there's no ROWNUM so a loop is needed anyway). Something like... I think you

Re: [GENERAL] How to preserve characters with accent?

2007-02-11 Thread Peter Eisentraut
dfx wrote: I have some fiel name with character with accent (à, ò...) but when I make a plain backup of schema (file.sql) that characters are converted to strange sequence of two (or more?) characters. You need to set your server and client encoding correctly. -- Peter Eisentraut

Re: [GENERAL] [ADMIN] Priorities for users or queries?

2007-02-11 Thread Tom Lane
Andreas Kretschmer [EMAIL PROTECTED] writes: You can retrieve the PID and the username of running querys in pg_stat_activity. Perhaps, with this knowledge and an untrusted language you can run system-commands such renice to change the priority of running postmaster-processes. See priority

Re: [GENERAL] Priorities for users or queries?

2007-02-11 Thread Benjamin Arai
Hi Magnus, Think this can be avoided as long the the queries executed on the lower priority process never lock anything important. In my case, I would alway be doing inserts with the lower priority process, so inversion should never occur. On the other hand if some lock occur somewhere else

Re: [GENERAL] How to preserve characters with accent?

2007-02-11 Thread marcelo Cortez
Hi there --- Peter Eisentraut [EMAIL PROTECTED] escribió: dfx wrote: I have some fiel name with character with accent (à, ò...) but when I make a plain backup of schema (file.sql) that characters are converted to strange sequence of two (or more?) characters. This sounds to me

[GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Anton Melser
Hi, I am trying to port an app to postgres and have come up against a most annoying problem. The app works with both mysql and sqlserver, who both seem to have a bit datatype instead of a proper boolean like pg. Alas, pg won't accept 1 and 0 for boolean... and npgsql won't convert my numeric(1)

Re: [GENERAL] no value found for parameter 1 error for query with no parameters

2007-02-11 Thread Peter Eisentraut
Phil Endecott wrote: I converted the first query like this: create or replace temporary view u_messages as select * from messsages where owner=$1; What makes you think this should work? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Peter Eisentraut
Anton Melser wrote: Is there any way to force pg to accept 1 and 0 for boolean? You can tweak the context for the cast between int and boolean. Read up about the pg_cast system catalog. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of

[GENERAL] PostgreSQL and OpenLdap

2007-02-11 Thread Cristiano Panvel
Hi Friends, This is my first post in the list. I am not obtaining authentication my users of PostgreSQL in OpenLdap. 1) PostgreSQL was compiled with the support to ldap in a FreeBSD System. option --with-ldap for configure. 2) The user also exists in the base of the OpenLdap 3) Already I

[GENERAL] Re: no value found for parameter 1 error for query with no parameters

2007-02-11 Thread Phil Endecott
Peter Eisentraut wrote: Phil Endecott wrote: I converted the first query like this: create or replace temporary view u_messages as select * from messsages where owner=$1; What makes you think this should work? Hi Peter, thanks for the quick reply. Well this page:

[GENERAL] Adjacency List or Nested Sets to model file system hierarchy?

2007-02-11 Thread Bill Moseley
I'm looking for a little guidance in representing a file system -- well just the file and directory structure of a file system. Often articles on representing a hierarchy discuss the advantages of using Nested Sets (or nested intervals) it seems. I'm not clear how well they apply to a file

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Joshua D. Drake
Anton Melser wrote: Hi, I am trying to port an app to postgres and have come up against a most annoying problem. The app works with both mysql and sqlserver, who both seem to have a bit datatype instead of a proper boolean like pg. Alas, pg won't accept 1 and 0 for boolean... and npgsql won't

[GENERAL] Naming conventions

2007-02-11 Thread Mark Walker
Sorry if this may be a bit off topic. I'm curious what naming conventions people use for column names. After trying quit a few different conventions I've come to use differing cases and the underscore to identify and delimit variables. A lot of it has to do with sql and Postgresql reserved

Re: [GENERAL] no value found for parameter 1 error for query with no parameters

2007-02-11 Thread Joshua D. Drake
Peter Eisentraut wrote: Phil Endecott wrote: I converted the first query like this: create or replace temporary view u_messages as select * from messsages where owner=$1; What makes you think this should work? Phil, You would do this: create view u_messages as select * from

Re: [GENERAL] line folding versus shop line

2007-02-11 Thread Michael Fuhr
On Wed, Feb 07, 2007 at 02:45:25AM -0800, [EMAIL PROTECTED] wrote: However, if I use psql then lines are folded even so the enviornment variable of LESS is set to S. How do I turn line folding off, so that records do not wrap around??? Is your PAGER environment variable set to less? --

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Anton Melser wrote: Is there any way to force pg to accept 1 and 0 for boolean? postgres=# insert into bool_test values(1::boolean); INSERT 166968558 1 postgres=# insert into bool_test values(0::boolean); INSERT 166968559 1 Possibly Anton is using

Re: [GENERAL] ERROR: failed to build any 8-way joins

2007-02-11 Thread Tom Lane
Ian Harding [EMAIL PROTECTED] writes: What is this? I just upgraded from 8.1.3 to 8.2.3 and things are blowing up a little bit. Please provide a self-contained test case. It's clearly a planner bug but I can't fix it without a test case. regards, tom lane

[GENERAL] How to set UTF8 to query browser of PgAdmin III

2007-02-11 Thread dfx
Dear Sirs, I am workink on Windows 2000 with PgAdmin III v. 1.6.2 If I open an sql file created with UTF8 encoding the characters with accent are not reproduced correctly. If I open the same file with MS Word or JEdit or also PgAdmin III on Fedora Core 5 it is all ok. Note, the file was created