Re: [GENERAL] postgres bash prompt error while user creation

2007-10-30 Thread Albe Laurenz
i want to create a shell script in that i want to create postgresql user and database.both this task are created properly and executed properly but after user and DB creation i am there on ( -bash-3.00$ ) and i wanna come back to [EMAIL PROTECTED]:localdomain ~]# and my script is

Re: [GENERAL] nonstandard use of

2007-10-30 Thread Albe Laurenz
Martin Peckham wrote: I recently installed the latest non-beta version 8.2 of postgresql. I get the following warning and hint in the server status GUI: WARNING:nonstandard use of \\ in a string literal at characters 64 HINT: Use the excape string syntax for backslashes, e.g,

Re: [GENERAL] sql

2007-10-30 Thread Albe Laurenz
Eva Elizalde wrote: quiero saber que version de sql maneja postgres I am afraid that there is no reasonable way to version PostgreSQL's SQL dialect other than the PostgreSQL version (currently at 8.2.5). There is the SQL standard, which is versioned in with the year of the publication, but

Re: [GENERAL] postgres bash prompt error while user creation

2007-10-30 Thread Scott Marlowe
On 10/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello group i want to create a shell script in that i want to create postgresql user and database.both this task are created properly and executed properly but after user and DB creation i am there on ( -bash-3.00$ ) and i wanna come

Re: [GENERAL] Inheritance problem when restoring db

2007-10-30 Thread Sebastjan Trepca
Great, super thanks! Sebastjan On 10/29/07, Tom Lane [EMAIL PROTECTED] wrote: I wrote: Sebastjan Trepca [EMAIL PROTECTED] writes: This is how to reproduce this issue: ... inh_test=# alter table capitals inherit cities; Fascinating. pg_dump is almost smart enough to get this right,

Re: [GENERAL] PostgreSQL .msi Installation Failure

2007-10-30 Thread Richard Huxton
Johnson Jesse wrote: I am trying to install postgreSQL v8.2.5 as a prerequisite for Firefox Bugzilla application on one of our network servers (Microsoft Server 2000). The logfile reads: fixing permissions on existing directory C:/Program Files/PostgreSQL/8.2/data ... ok creating

Re: [GENERAL] Data cube in PostgreSQL

2007-10-30 Thread Richard Huxton
Gowrishankar L wrote: Hi All, I need to make certain changes to cube.c file which comes with cube contrib ( http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/cube/). I am not sure how to compile it so that I can use those changes in postgresql. Could you help me? Well, the full

Re: [GENERAL] Raid Chunk Sizes for DSS type DB

2007-10-30 Thread Hannes Dorbath
On 30.10.2007 03:11, Joshua D. Drake wrote: Ow Mun Heng [EMAIL PROTECTED] wrote: It's not an optimal setup but since I only have 3x500G drives to play with, I can't build a Raid10 Uhhh RAID 1 is your best bet. You get fault tolerance (mirrored) plus you get a hot spare (3 drives). This is

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-30 Thread Pavel Stehule
2007/10/26, Patrick TJ McPhee [EMAIL PROTECTED]: In article [EMAIL PROTECTED], cluster [EMAIL PROTECTED] wrote: % How important is true randomness? % % The goal is an even distribution but currently I have not seen any way % to produce any kind of random sampling efficiently. Notice the

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-30 Thread vincent
2007/10/26, Patrick TJ McPhee [EMAIL PROTECTED]: In article [EMAIL PROTECTED], cluster [EMAIL PROTECTED] wrote: % How important is true randomness? % % The goal is an even distribution but currently I have not seen any way % to produce any kind of random sampling efficiently. Notice the

[GENERAL] Checking empty array

2007-10-30 Thread Alexis Beuraud
Dear all, What is the correct way to check whether an array is empty? I have an array which I initialize with '{}' and then do som array_append under some circonstances. I would like to know whether the array is empty at the end of the function. I have not found the answer in the help page nor on

Re: [GENERAL] Checking empty array

2007-10-30 Thread Richard Huxton
Alexis Beuraud wrote: Dear all, What is the correct way to check whether an array is empty? -- Is my array empty now? IF (myarray isnull) THEN An empty array isn't null (unknown), it's empty. Try enquiring about it's size: SELECT array_dims('{}'::integer[]) is null; ?column? --

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-30 Thread Pavel Stehule
2007/10/30, vincent [EMAIL PROTECTED]: 2007/10/26, Patrick TJ McPhee [EMAIL PROTECTED]: In article [EMAIL PROTECTED], cluster [EMAIL PROTECTED] wrote: % How important is true randomness? % % The goal is an even distribution but currently I have not seen any way % to produce any

Re: [GENERAL] Checking empty array

2007-10-30 Thread Pavel Stehule
2007/10/30, Alexis Beuraud [EMAIL PROTECTED]: Dear all, What is the correct way to check whether an array is empty? I have an array which I initialize with '{}' and then do som array_append under some circonstances. I would like to know whether the array is empty at the end of the function.

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Catalin Marinas
On 28/10/2007, Oleg Bartunov [EMAIL PROTECTED] wrote: On Sat, 27 Oct 2007, Tom Lane wrote: Catalin Marinas [EMAIL PROTECTED] writes: Is there an easy way to generate a headline from separate fragments containing the search words and maybe separated by ...? Hmm, the documentation for

Re: [GENERAL] Which index can i use ?

2007-10-30 Thread Richard Huxton
Abandoned wrote: Hi.. I want to do index in postgresql python. My table: id(int) | id2(int) | w(int) | d(int) My query: select id, w where id=x and id2=y (sometimes and d=z) I have too many insert and select operation on this table. And which index type can i use ? Btree, Rtree, Gist or Hash

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Oleg Bartunov
Catalin, what is your need ? What's wrong with this ? postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3 xyz','2'::tsquery, 'StartSel=...,StopSel=...') ; ts_headline --- 1 ...2... 3 4 5 3 4 abc abc ...2... 3 xyz Oleg On Tue, 30

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Richard Huxton
Oleg Bartunov wrote: Catalin, what is your need ? What's wrong with this ? postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3 xyz','2'::tsquery, 'StartSel=...,StopSel=...') ; ts_headline --- 1 ...2... 3 4 5 3 4 abc abc ...2... 3

Re: [GENERAL] print command in sproc

2007-10-30 Thread Filip Rembiałkowski
2007/10/30, Jorge Godoy [EMAIL PROTECTED]: Em Tuesday 23 October 2007 07:17:53 Goboxe escreveu: Hi, What is the equivalent MSSQL 'print' command in pg sproc? What does the MSSQL 'print' command prints? It prints what you tell it to print :) Goboxe: The key question is, what you need

Re: [GENERAL] Problems with PostgreSQL DBI-Link / DBD-ODBC

2007-10-30 Thread Pit M.
Hi David! Thanks for the fast reply. So you mean that I might already have created a connection but am still trying to create the same one again? Check whether the existing one works :) So how can I test it? What is the correct way of accessing this data source in a select statement?

Re: [GENERAL] Data cube in PostgreSQL

2007-10-30 Thread Filip Rembiałkowski
I see a misunderstanding here. cube contrib is for handling geometrical data. EFEU package is OLAP - related, that's entirely different topic. http://www.informit.com/articles/article.aspx?p=24684 2007/10/1, Dimitri Fontaine [EMAIL PROTECTED]: Hi, Le Wednesday 26 September 2007 20:58:38

Re: [GENERAL] Checking empty array

2007-10-30 Thread Albe Laurenz
Alexis Beuraud wrote: What is the correct way to check whether an array is empty? Here is what I do, in pseudo-code: -- Is my array empty now? IF (myarray isnull) THEN Try this: IF array_lower(myarray, 1) IS NULL THEN ... END IF Yours, Laurenz Albe ---(end of

Re: [GENERAL] Collation sequence and use of operatings system's locale

2007-10-30 Thread Peter Eisentraut
Am Montag, 29. Oktober 2007 schrieb James Gates: Notice that the results don't match the operating system's (either byte code or dictionary) sort order for the same locale, or even the C or POSIX locales. Note that none of the sort orders you showed match an actual Swedish dictionary sort, so

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Catalin Marinas
On 30/10/2007, Richard Huxton [EMAIL PROTECTED] wrote: Oleg Bartunov wrote: Catalin, what is your need ? What's wrong with this ? postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3 xyz','2'::tsquery, 'StartSel=...,StopSel=...') ; ts_headline

Re: [GENERAL] function and passing the table name to be used with SQL stmnt

2007-10-30 Thread Douglas McNaught
kamiseq [EMAIL PROTECTED] writes: select into _id lastval(); and is that safe operation, can I rely on lastval() that it will return value of id that was inserted before? You want to use currval() with the sequence name. can it happened that other user will insert something between my

Re: [GENERAL] Partitioning: how to exclude unrelated partitions?

2007-10-30 Thread paul rivers
Sean Z. wrote: Hi, I partitioned a table events into 31 tables, based on day of event_time. I did 3 steps to setup partition, after creating partition tables: 1. Add the constraint to the 31 partition tables like: ALTER TABLE events_day_1 ADD CONSTRAINT events_day_1_event_time_check

Re: [GENERAL] Base Backups from PITR Standby

2007-10-30 Thread Brian Wipf
On 29-Oct-07, at 11:06 PM, Tom Lane wrote: Brian Wipf [EMAIL PROTECTED] writes: The process I use that leads to the warnings is simple: I use pg_controldata to determine the current checkpoint WAL location of the standby server. I ensure I have this WAL file and all newer WALs. I backup

Re: [GENERAL] Problems with PostgreSQL DBI-Link / DBD-ODBC

2007-10-30 Thread David Fetter
On Tue, Oct 30, 2007 at 01:12:41PM +0100, Pit M. wrote: Hi David! Thanks for the fast reply. So you mean that I might already have created a connection but am still trying to create the same one again? Yes. Check whether the existing one works :) So how can I test it? Fire up psql and

Re: [GENERAL] PostgreSQL and AutoCad

2007-10-30 Thread Bob Pawley
If your holy grail is the ability of using infomation to drive drawings I have to ask if you have any idea what that could lead too? - Design productivity would increase by factors of hundreds - perhaps thousands. - Information would be infinitly adaptable. - Structure that information

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Oleg Bartunov
On Tue, 30 Oct 2007, Catalin Marinas wrote: On 30/10/2007, Richard Huxton [EMAIL PROTECTED] wrote: Oleg Bartunov wrote: Catalin, what is your need ? What's wrong with this ? postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3 xyz','2'::tsquery, 'StartSel=...,StopSel=...') ;

[GENERAL] pgsql.broken.csc

2007-10-30 Thread M Rather
Hello, one of our clients is using pgsql 8.1, and recently the site crashed due to lack of hard disk space. Upon inspection a file was found : pgsql.broken.csc (size: 51 GB) I cannot find any reference to this file on pgsql site or on google. What is this file? Is it related to PGSQL?

Re: [GENERAL] pgsql.broken.csc

2007-10-30 Thread Tom Lane
M Rather [EMAIL PROTECTED] writes: one of our clients is using pgsql 8.1, and recently the site crashed due to lack of hard disk space. Upon inspection a file was found : pgsql.broken.csc (size: 51 GB) I cannot find any reference to this file on pgsql site or on google. What is this

Re: [GENERAL] pgsql.broken.csc

2007-10-30 Thread M Rather
Tom Lane wrote: M Rather [EMAIL PROTECTED] writes: one of our clients is using pgsql 8.1, and recently the site crashed due to lack of hard disk space. Upon inspection a file was found : pgsql.broken.csc (size: 51 GB) I cannot find any

[GENERAL] Table has type character varying, but query expects character varying

2007-10-30 Thread Howard Cole
I have the following table in a win32 8.2.2 database: (dumped from pgadmin) CREATE TABLE email_directory ( email_directory_id serial NOT NULL, mailbox_id integer NOT NULL, path character varying(255) NOT NULL, marked_for_deletion boolean NOT NULL DEFAULT false, CONSTRAINT

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Sushant Sinha
This is a nice idea and seems easy to implement. I will try to write it down and send a patch to the mailing list. I was also working to add support for phrase search. Currently to check for phrase you have to match the entire document. It will be better if a filter like

Re: [GENERAL] Table has type character varying, but query expects character varying

2007-10-30 Thread Tom Lane
Howard Cole [EMAIL PROTECTED] writes: I have the following table in a win32 8.2.2 database: (dumped from pgadmin) ... What has gone wrong? You're using a broken release :-( http://www.postgresql.org/docs/8.2/static/release-8-2-3.html regards, tom lane

[GENERAL] PG windows service issues

2007-10-30 Thread Yves Moisan
Hi All, I'm new to this list. I've set up postgreSQL on windows about 4 times since the first 8.x series came out. The first time it was 8.0 beta3 IIRC. I believe I've installed another in the 8.0 series, then a 8.1 then just a couple of weeks ago 8.2.4. Every time I run into the same

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Tom Lane
On 10/30/07, Oleg Bartunov [EMAIL PROTECTED] wrote: ... In tsearch2 we have get_covers() function, which produces all excerpts like: I had not realized till just now that the 8.3 core version of tsearch omitted any material feature of contrib/tsearch2. Why was get_covers() left out?

[GENERAL] active connections

2007-10-30 Thread João Paulo Zavanela
Hi, I would like to know how many active connections exist. Is necessary show the number ip of client. Please, somebody knows? Thanks! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] active connections

2007-10-30 Thread A. Kretschmer
am Tue, dem 30.10.2007, um 14:51:33 -0300 mailte João Paulo Zavanela folgendes: Hi, I would like to know how many active connections exist. Is necessary show the number ip of client. ask pg_stat_activity (select * from pg_stat_activity;) Andreas -- Andreas Kretschmer Kontakt: Heynitz:

[GENERAL] Updated .vim file

2007-10-30 Thread Decibel!
Does anyone have a .vim file that takes dollar quoting into account? I've tried the one mentioned at http://archives.postgresql.org/pgsql-general/2006-04/msg01266.php , but it doesn't appear to understand dollar quotes. -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give

Re: [GENERAL] Base Backups from PITR Standby

2007-10-30 Thread Simon Riggs
On Tue, 2007-10-30 at 08:25 -0600, Brian Wipf wrote: I'm trying to take a base backup from the standby server in archive recovery mode. I don't believe it's possible to connect to it to issue pg_start_backup/pg_stop_backup.

Re: [GENERAL] Fragments in tsearch2 headline

2007-10-30 Thread Oleg Bartunov
On Tue, 30 Oct 2007, Tom Lane wrote: On 10/30/07, Oleg Bartunov [EMAIL PROTECTED] wrote: ... In tsearch2 we have get_covers() function, which produces all excerpts like: I had not realized till just now that the 8.3 core version of tsearch omitted any material feature of contrib/tsearch2.

Re: [GENERAL] PG windows service issues

2007-10-30 Thread Oisin Glynn
Yves Moisan wrote: Hi All, I'm new to this list. I've set up postgreSQL on windows about 4 times since the first 8.x series came out. The first time it was 8.0 beta3 IIRC. I believe I've installed another in the 8.0 series, then a 8.1 then just a couple of weeks ago 8.2.4. Every time I

Re: [GENERAL] PostgreSQL and AutoCad

2007-10-30 Thread Ilan Volow
As I have a vested interest in storing AutoCad stuff in PostgreSQL, I searched for something like this a while ago and I ran across this.. I haven't really had a chance to play with it yet http://sourceforge.net/projects/dxf2postgis/ I'm personally interested in the idea of versioning for

Re: [GENERAL] Base Backups from PITR Standby

2007-10-30 Thread Brian Wipf
On 30-Oct-07, at 2:42 PM, Simon Riggs wrote: It's safest to shutdown the standby first, take a backup then crank it up again. It's possible to do it online in the way you suggest, but only when running with either full_page_writes = on or when making the backup with rsync, or another method

Re: [GENERAL] PostgreSQL and AutoCad

2007-10-30 Thread Thomas Kellerer
Ilan Volow wrote on 30.10.2007 23:01: I'm personally interested in the idea of versioning for a drawing. Instead of storing the entire drawing for each version, one could theoretically just store the vector additions/changes/deletions that happen from one revision to the next. Which could

Re: [GENERAL] SSL Connectivity on Solaris 10 x86

2007-10-30 Thread Dot Yet
I am using md5. OK. thanks for the clue... Now, for the root certificate anyone? :) regards, dotyet On 10/30/07, Tom Lane [EMAIL PROTECTED] wrote: Dot Yet [EMAIL PROTECTED] writes: I am seeing this Connection reset by peer message in the postmaster.logfile, but the connection between

Re: [GENERAL] PostgreSQL and AutoCad

2007-10-30 Thread Bob Pawley
Thanks Ilan this looks promising. Bob - Original Message - From: Ilan Volow To: pgsql-general@postgresql.org Sent: Tuesday, October 30, 2007 3:01 PM Subject: Re: [GENERAL] PostgreSQL and AutoCad As I have a vested interest in storing AutoCad stuff in PostgreSQL, I

[GENERAL] generating UPDATE SET ... WHERE PK = ...

2007-10-30 Thread Laurent ROCHE
Hi, I would like to generate with a request a SQL order like UPDATE tab1 SET col_a = ?, col_b = ? ... WHERE pk = ? for each table of a given schema (in fact what I want is slightly more complicated but if I can write the above, I will be able to get the rest). Will anyone be kind enough to

Re: [GENERAL] Delete/Update with order by

2007-10-30 Thread David Fetter
On Thu, Oct 25, 2007 at 09:22:02AM -0300, Evandro Andersen wrote: In Oracle you can use this: DELETE FROM A WHERE A1 = 10 ORDER BY A2 There is something in the Postgresql ? Yes. DELETE...USING :) http://www.postgresql.org/docs/current/static/sql-delete.html Cheers, David. -- David

[GENERAL]

2007-10-30 Thread carter ck
Hi all, I was trying to create function in postgres, but it returns error mentioning the language is NOT defined. The function is as following: CREATE OR REPLACE FUNCTION test_word_count(TEXT, TEXT) RETURNS INTEGER AS $$ DECLARE d_word ALIAS FOR $1; d_phrase ALIAS FOR $2; BEGIN IF d_word

Re: [GENERAL]

2007-10-30 Thread Ron St-Pierre
carter ck wrote: Hi all, I was trying to create function in postgres, but it returns error mentioning the language is NOT defined. The function is as following: CREATE OR REPLACE FUNCTION test_word_count(TEXT, TEXT) RETURNS INTEGER AS $$ DECLARE d_word ALIAS FOR $1; d_phrase ALIAS