[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 o

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 --

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 An

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

2007-02-11 Thread Ian Harding
What is this? I just upgraded from 8.1.3 to 8.2.3 and things are blowing up a little bit. I noticed something in postgresql.conf about max_stack_depth, is this related? - Ian ---(end of broadcast)--- TIP 4: Have you searched our list archives?

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] "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 sele

[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 w

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 w

[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 system

[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: http://ww

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

2007-02-11 Thread Peter Eisentraut
Phil Endecott wrote: > > Is there any way to force pg to accept 1 and 0 for boolean? > > There is something called "create cast ... without function" which > /might/ do what you want. No, it won't, mainly because int and boolean are not binary compatible. -- Peter Eisentraut http://developer.post

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

2007-02-11 Thread Phil Endecott
Is there any way to force pg to accept 1 and 0 for boolean? There is something called "create cast ... without function" which /might/ do what you want. Phil. ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[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 al

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 broadcast

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/ ---(

[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) in

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

2007-02-11 Thread Phil Endecott
Dear All, I have recently been converting some old code to use $n parameter placeholders, rather than inlining the values in the query string. It has mostly gone well, but I have encountered some odd behaviour with a temporary view. I'm using libpq to talk to an 8.1.0 server. This is the ol

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

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

2007-02-11 Thread A. Kretschmer
am Sun, dem 11.02.2007, um 12:37:57 -0500 mailte Tom Lane folgendes: > 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

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] [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 "priori

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 http://de

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 a

[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 bro

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 t

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

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] 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 c

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

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) ap

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 use