Re: [GENERAL] psql "SCHEMA" switch

2006-12-22 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On Dec 22, 2006, at 15:15 , Paul Silveira wrote: >> Because psql does not have a schema switch, I had to do it this way... > As the schema is part of the DDL, I think it's better to have it as > part of DDL script rather than a switch for psql, ei

Re: [GENERAL] Problem with index in OR'd expression

2006-12-22 Thread Tom Lane
[EMAIL PROTECTED] writes: >select * from t where c1 = 75000; >select * from t where ((0 is null) OR (c1 = 75000)); > The first one properly uses the index on c1, the second does not. > Obviously, a human looking at the second one would realize it's > essentially identical to the first an

Re: [GENERAL] Functions on tables

2006-12-22 Thread elein
On Mon, Dec 18, 2006 at 12:15:34AM +1100, Brendan Jurd wrote: > On 12/17/06, Tom Lane <[EMAIL PROTECTED]> wrote: > >But having said all that, I think there are bits of SQL2003 that do some > >of what you're after. I don't think anyone has looked hard at what > >would be involved in merging those n

Re: [GENERAL] xml2 install problem

2006-12-22 Thread Nikolay Samokhvalov
If you do not need XSTL support (this contrib consists of two parts, one for XPath and another for XSLT), you can remove any mentioning of *xslt* from Makefile and xml2.sql.in file and then try gmake again. On 12/20/06, Paul Silveira <[EMAIL PROTECTED]> wrote: Hello, I just installed Postgres

Re: [GENERAL] psql "SCHEMA" switch

2006-12-22 Thread Michael Glaesemann
On Dec 22, 2006, at 15:15 , Paul Silveira wrote: I wanted to connect to a DB and then insert that new DDL into a "specific" schema. Because psql does not have a schema switch, I had to do it this way... As the schema is part of the DDL, I think it's better to have it as part of DDL scr

[GENERAL] psql "SCHEMA" switch

2006-12-22 Thread Paul Silveira
I was trying to run a psql script today against a database today. This script was schema agnostic. (There were table creations and function creations but none of them contained the specific schema to create them in...) I wanted to connect to a DB and then insert that new DDL into a "specific" s

[GENERAL] Problem with index in OR'd expression

2006-12-22 Thread postgresql . org
Hello, I've been using PostgreSQL for a few years and mostly love it. Aside from a few (perceived, anyway) annoying limitations in PL/PGSQL (which I almost exclusively am using for db interaction), I'm very satisfied with it. I ran across this problem several months back and decided to blow

Re: [GENERAL] lo_import

2006-12-22 Thread Joshua D. Drake
On Fri, 2006-12-22 at 10:58 -0800, Bob Pawley wrote: > I have an interface that I am attempting to connect to a remote database for > which I have only client privileges. ( I would prefer to incorporate all of > this in a single installable .exe file, as the application, as it now > stands, is f

Re: [GENERAL] lo_import

2006-12-22 Thread Bob Pawley
I have an interface that I am attempting to connect to a remote database for which I have only client privileges. ( I would prefer to incorporate all of this in a single installable .exe file, as the application, as it now stands, is for mostly single users. But the only method I have found to d

Re: [GENERAL] lo_import

2006-12-22 Thread Joshua D. Drake
On Fri, 2006-12-22 at 10:25 -0800, Bob Pawley wrote: > If I can't use lo_import what method do you suggest I use for a large object > (in this case images). It would be helpful if I knew what you were actually trying to do. For example, perl has the ability to remotely do lo manipulation. Joshua

Re: [GENERAL] lo_import

2006-12-22 Thread Bob Pawley
If I can't use lo_import what method do you suggest I use for a large object (in this case images). Bob - Original Message - From: "Joshua D. Drake" <[EMAIL PROTECTED]> To: "Bob Pawley" <[EMAIL PROTECTED]> Cc: "Postgresql" Sent: Friday, December 22, 2006 10:12 AM Subject: Re: [GENERA

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Joost Kuckartz
Thanks for all the help guys, I actually found the problem and solution. Maybe for others who will have this, let me recap: - While installing the msi file I had to disable the initialization in the installer, because of installation on a FAT32 partition - I then ran the initdb.exe, typing in m

Re: [GENERAL] lo_import

2006-12-22 Thread Joshua D. Drake
On Fri, 2006-12-22 at 10:05 -0800, Bob Pawley wrote: > My remote server recognizes the fokkowing expression as a server side > command. > > - > Insert Into library.devices (Item_id, device, a_d, designation, > function_, type_, function1) > Values ( 'Tdeviceft2a', lo_import('c:/program >

[GENERAL] lo_import

2006-12-22 Thread Bob Pawley
My remote server recognizes the fokkowing expression as a server side command. - Insert Into library.devices (Item_id, device, a_d, designation, function_, type_, function1) Values ( 'Tdeviceft2a', lo_import('c:/program files/postgresql/8.0/lib/images/magflow.bmp'), 'a', 'F', 'A_Flow',

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Magnus Hagander
> So there's no other way to start the server else than to create an > unpriviledged winxp user account, or change my user account (and forever > not be able to install programs, change settings etc etc.)? There must > be, I can't imagine postgresql is in backwards world: making the admin > less pr

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Joshua D. Drake
> So there's no other way to start the server else than to create an > unpriviledged winxp user account, or change my user account (and > forever not be able to install programs, change settings etc etc.)? > There must be, I can't imagine postgresql is in backwards world: > making the admin less p

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Joost Kuckartz
> 2006/12/22, Joost Kuckartz <[EMAIL PROTECTED]>:> > I only have one user > account on my winxp (if it's that one> > PostgreSQL is looking at) and I > don't want to switch to another user (create> > even one) to start the > postgres server.> > If you don't want to create another user account

Re: [GENERAL] xml2 install problem

2006-12-22 Thread Paul Silveira
Thanks Devrim, I'll try the up2date command and post back my successs on this list... Have a happy holiday... -Paul Devrim GUNDUZ-3 wrote: > > Hi Paul, > > On Wed, 2006-12-20 at 14:07 -0800, Paul Silveira wrote: >> ok. tried to install the correct libs and then do it but still same >> erro

[GENERAL] which schema to install contrib modules

2006-12-22 Thread Paul Silveira
Hello, I was wonding what the community's opinion was on which schema the contrib modules should be installed into. I intend on using DBLink, tsearch2, and xml2 and have initially installed them in the public schema. That will work but it really clutters that schema and I was also intending on

Re: [GENERAL] Tricky join question

2006-12-22 Thread Tim Tassonis
Thanks to you all for your replies. I was able to solve my problem after some more reading in the manual: select c.id, c.name, pc.person_id from person as p cross join course as c left outer join person_course as pc on (p.id = pc.person_id and c.id = pc.course_id) where p.id = 2; A

Re: [GENERAL] Tricky join question

2006-12-22 Thread Andreas Kretschmer
Tim Tassonis <[EMAIL PROTECTED]> schrieb: > This is absolutely not what I want. I want a row for every person and every > course, regardless whether the person has taken the course or not. If the > person has not taken the course, I want a null value in the person id > column: test=# select c

Re: [GENERAL] Tricky join question

2006-12-22 Thread Tom Lane
Tim Tassonis <[EMAIL PROTECTED]> writes: > In mysql, the following statement: > SELECT c.id, c.name, pc.person_id > FROM person as p >left outer join person_course as pc on p.id = pc.person_id >right outer join course as c on pc.course_id = c.id > where p.id = 2 order by 1; > wil

Re: [GENERAL] Tricky join question

2006-12-22 Thread brian
Tim Tassonis wrote: Hi Andreas First, you should use referential integrity: I do, that is not the point. It was a simplified data model. Of course I have primary keys and stuff, but they don't affect join behaviour at all. test=# create table person(id int primary key, name text); NOTIC

Re: [GENERAL] Tricky join question

2006-12-22 Thread Martijn van Oosterhout
Hi, Without restriction you're getting: On Fri, Dec 22, 2006 at 02:55:56PM +0100, Tim Tassonis wrote: > +---+-++ > | id| name| person_id | > +---+-++ > | 1

Re: [GENERAL] Tricky join question

2006-12-22 Thread Tim Tassonis
Hi Andreas First, you should use referential integrity: I do, that is not the point. It was a simplified data model. Of course I have primary keys and stuff, but they don't affect join behaviour at all. test=# create table person(id int primary key, name text); NOTICE: CREATE TABLE / PRIMA

Re: [GENERAL] Tricky join question

2006-12-22 Thread A. Kretschmer
am Fri, dem 22.12.2006, um 12:12:06 +0100 mailte Tim Tassonis folgendes: > Hi all > > I have a join problem that seems to be too difficult for me to solve: > > I have: > > table person > id integer, > namevarchar(32) > > data: > > 1,"Jack" > 2,"Jill" > 3,"Bob" >

Re: [GENERAL] Tsearch2 default locale on postgres 8.2

2006-12-22 Thread Hannes Dorbath
I don't think calling set_curcfg() is necessary for anything in that case then.. On 22.12.2006 12:36, Tarabas (Manuel Rorarius) wrote: After that change, the "select set_curcfg('default');" worked fine. -- Regards, Hannes Dorbath ---(end of broadcast)

[GENERAL] Tricky join question

2006-12-22 Thread Tim Tassonis
Hi all I have a join problem that seems to be too difficult for me to solve: I have: table person id integer, namevarchar(32) data: 1,"Jack" 2,"Jill" 3,"Bob" table course id integer, name varchar(32) data: 1,"SQL Beginner" 2,"

Re: [GENERAL] Tsearch2 default locale on postgres 8.2

2006-12-22 Thread Tarabas (Manuel Rorarius)
Hi, right ... i had a typo in the locale, it was set to "de_DE.UTF8" but should have been set to "de_DE.UTF-8". After that change, the "select set_curcfg('default');" worked fine. thanx a lot... Best regards Manuel Friday, December 22, 2006, 12:35:41 PM, you wrote: HD> I think the best way is

Re: [GENERAL] Tsearch2 default locale on postgres 8.2

2006-12-22 Thread Hannes Dorbath
I think the best way is to adjust the locale for your default config: Type: SHOW lc_ctype; (or some other lc_* variables) in psql. to find your cluster locale, then: UPDATE public.pg_ts_cfg SET locale = '' WHERE ts_name = 'default'; On 22.12.2006 11:55, Tarabas (Manuel Rorarius) wrote:

Re: [GENERAL] Tsearch2 default locale on postgres 8.2

2006-12-22 Thread Teodor Sigaev
set_curcfg() is working only for current session Tarabas (Manuel Rorarius) wrote: Hi! I am having a tsearch2 problem on postgres 8.2 again ... when I try to set the default config for tsearch2 with "select set_curcfg('default'); it works fine in the same pgadmin session when i use

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Filip Rembiałkowski
2006/12/22, Joost Kuckartz <[EMAIL PROTECTED]>: I only have one user account on my winxp (if it's that one PostgreSQL is looking at) and I don't want to switch to another user (create even one) to start the postgres server. If you don't want to create another user account (why?), then you will

[GENERAL] Tsearch2 default locale on postgres 8.2

2006-12-22 Thread Tarabas (Manuel Rorarius)
Hi! I am having a tsearch2 problem on postgres 8.2 again ... when I try to set the default config for tsearch2 with "select set_curcfg('default'); it works fine in the same pgadmin session when i use "select show_curcfg();" afterwards. The correct OID is shown. If i then close

Re: [GENERAL] TSearch2 Changeset 25387

2006-12-22 Thread Hannes Dorbath
I tried the other german dicts available for download on the OO site. I can't get it working with any. Neither in MySpell nor iSpell format. On 22.12.2006 11:22, Hannes Dorbath wrote: Mix a OO 2.0.2 affix file with a 2.0.1 dict? :/ -- Regards, Hannes Dorbath ---(end

Re: [GENERAL] TSearch2 Changeset 25387

2006-12-22 Thread Hannes Dorbath
These are the files I've bee using with PG 8.1.5-gin-utf8: http://hannes.imos.net/dict-8.1.5-working.bz2 IIRC the way I created them was identical to what I tried with 2.0.1 dict in the last post (compound.pl/my2ispell/iconv). I can see myself that in the 2.0.1 affix file there is no compound

Re: [GENERAL] Autovacuum Improvements

2006-12-22 Thread Csaba Nagy
On Thu, 2006-12-21 at 18:41, Alvaro Herrera wrote: > > From all the discussion here I think the most benefit would result from > > a means to assign tables to different categories, and set up separate > > autovacuum rules per category (be it time window when vacuuming is > > allowed, autovacuum pro

Re: [GENERAL] TSearch2 Changeset 25387

2006-12-22 Thread Hannes Dorbath
Ok. I can't get it working with the 2.0.1 dicts as well. I got the 2.0.1 dict from: http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/de_DE.zip - Run compound.pl on it to add the \z flags. - Run my2ispell on it. - Run iconv -t utf-8 on it. The resulting files are at:

Re: [GENERAL] Partitioning Vs. Split Databases - performance?

2006-12-22 Thread Csaba Nagy
Ben, On Thu, 2006-12-21 at 20:10, Benjamin Smith wrote: > I'm breaking up a database into several sets of data with similar layout. (we > currently have multiple customers using a single database and tableset, we're > splitting it out to give us more "wiggle room") We have here a very similar

[GENERAL] 答复: [GENERAL] Unable to start server - win xp

2006-12-22 Thread 马庆
Well, you mean you don’t know how to start the server on your WinXP? I think you could install your postgresql on linux or unix instead of windows. To start the server , you can use postmaster �CD database �CU . U can use your user name replace the . Also,I think you can read Howtos and use com

Re: [GENERAL] Unable to start server - winxp

2006-12-22 Thread Joost Kuckartz
Hello all, I changed port 80 again, so localhost is now running on that. I checked all the manuals, which were mostly written for linux and unix based systems. The only command I found was "postmaster -D database". When I try that, I'm getting the following error: "Execution of PostgreSQL by

Re: [GENERAL] Password strength requirements

2006-12-22 Thread Rafal Pietrak
On Fri, 2006-12-22 at 01:20 -0600, Bruno Wolff III wrote: > On Thu, Dec 21, 2006 at 23:43:06 +0100, > Tomasz Ostrowski <[EMAIL PROTECTED]> wrote: > > > > And everything I need would be very simple to do if there was an > > option to disable self-change of passwords for ordinary users. > > That

Re: [GENERAL] Partitioning Vs. Split Databases - performance?

2006-12-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/22/06 01:22, Tom Lane wrote: > Ron Johnson <[EMAIL PROTECTED]> writes: >> Besides, since pg_dump is single-threaded, backing up a huge >> database gets impossible. Federating the database allows multiple >> pg_dumps to simultaneously dump data t

Re: [GENERAL] Need help on "org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command"

2006-12-22 Thread Wong Jowo
The postgres error message is the same : FATAL: terminating connection due to administrator command But in log I saw that ther is on kind of error that happened before the "FATAL: terminating connection due to administrator command", it's : "FATAL: sorry, too many clients already". I'm using t