Re: [GENERAL] Postgresql and Macintosh

2005-02-08 Thread Thomas F.O'Connell
I don't think it's a standard part of OS X. I think it comes with Apple Remote Desktop, and it might be in the Server edition, but it's not a part of the standard version. -tfo -- Thomas F. O'Connell Co-Founder, Information Architect Sitening, LLC http://www.sitening.com/ 110 30th Avenue North,

Re: [GENERAL] Postgresql and Macintosh

2005-02-08 Thread Tino Wildenhain
Am Mittwoch, den 09.02.2005, 16:39 +0100 schrieb renato.barrios: > Please tell me if Postgresql runns in an iMac. IIRC postgres is even part of Mac OS X. (perhaps not the latest version) Regards Tino ---(end of broadcast)--- TIP 2: you can get off

Re: [GENERAL] create temp table and on commit in 7.3.3

2005-02-08 Thread Antony Paul
I learned that there is an on commit clause by looking at the Compaitiblity section of the 7.3.3 docs and I was confused whether it is supporting this or not rgds Antony Paul On Wed, 9 Feb 2005 00:19:41 -0700, Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Wed, Feb 09, 2005 at 06:00:52PM +1100, N

Re: [GENERAL] create temp table and on commit in 7.3.3

2005-02-08 Thread Michael Fuhr
On Wed, Feb 09, 2005 at 06:00:52PM +1100, Neil Conway wrote: > On Wed, 2005-02-09 at 10:48 +0530, Antony Paul wrote: > > Hi all, > > This is giving error in 7.3.3. > > > > CREATE TEMP TABLE temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS; > > ERROR: parser: parse error at or near "ON" a

Re: [GENERAL] create temp table and on commit in 7.3.3

2005-02-08 Thread Neil Conway
On Wed, 2005-02-09 at 10:48 +0530, Antony Paul wrote: > Hi all, > This is giving error in 7.3.3. > > CREATE TEMP TABLE temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS; > ERROR: parser: parse error at or near "ON" at character 51 > > Is this supported. No. Looking at the manual would h

Re: [GENERAL] Postgresql and Macintosh

2005-02-08 Thread John DeSoi
On Feb 9, 2005, at 10:39 AM, renato.barrios wrote: Please tell me if Postgresql runns in an iMac. Sure, assuming your iMac is running OS X. You'll need to install Apple's free developer tools to compile it or perhaps you might want to use one of the freely available installers such as: http://ww

Re: [GENERAL] Database permissions

2005-02-08 Thread John DeSoi
Art, On Feb 8, 2005, at 11:51 PM, Art Fore wrote: More confused than ever. The pg_hba.conf file shown below was what I had originaly to get phppgadmin to work. Changed the local all all ident md5 to local all all

Re: [GENERAL] pgpool simple feature request

2005-02-08 Thread Tatsuo Ishii
> > "TI" == Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > TI> Yes, I thought about that too. Probably we need two kinds of > TI> initializations: > > TI> 1) initilization for each new connection (as you requested) > > TI> 2) initilization for each new client connection > > I think this latte

Re: [GENERAL] Safely Killing Backends

2005-02-08 Thread Thomas F.O'Connell
My point/question is: when I've seen this before and recovery mode is taking on the order of minutes, I find that doing: pg_ctl stop -m i pg_ctl start is faster (on the order of seconds) than letting postgres finish recovery mode. So I wonder: 1. Is this safe from a data integrity point of view

Re: [GENERAL] Database permissions

2005-02-08 Thread javier wilson
local is for all local connections, phppgadmin i guess is local, if run on the same computer could be local, depending on your configuration. is access and odbc on a different computer? in that case you could add host all all ipnumber mask trust to allow access to all databeses as any user for

Re: [GENERAL] Safely Killing Backends

2005-02-08 Thread Vivek Khera
> "TFO" == Thomas F O'Connell writes: TFO> Which brings up a follow-up question: is it documented anywhere TFO> exactly what goes on in recovery mode? If so, I've not found it. TFO> When I've experienced this, it has seemed quicker just to stop and TFO> restart postgres than to let recovery

[GENERAL] More concurent transaction over single connection ?

2005-02-08 Thread NTPT
AFAIK (7.4.x) there is one limitation in persistant connections to postgresql from various frontends ( http://cz.php.net/manual/en/features.persistent-connections.php ), because it can not use transactions in situation where more concurent tasks use a single connection (execuse my wrong english

Re: [GENERAL] pgpool simple feature request

2005-02-08 Thread Vivek Khera
> "TI" == Tatsuo Ishii <[EMAIL PROTECTED]> writes: TI> Yes, I thought about that too. Probably we need two kinds of TI> initializations: TI> 1) initilization for each new connection (as you requested) TI> 2) initilization for each new client connection I think this latter one is important.

[GENERAL] Postgresql and Macintosh

2005-02-08 Thread renato.barrios
Please tell me if Postgresql runns in an iMac. Thanks, Renato ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Backup restore does not work

2005-02-08 Thread Joshua D. Drake
Art Fore wrote: Using PGadminIII, I backup my database on linux machine, and try to restore it on the windows machine. Alway comes up with duplicate key on the first item. I drop all views and the only table in the database and try again. Still same thing. I do a refrresh, none of the views or

[GENERAL] create temp table and on commit in 7.3.3

2005-02-08 Thread Antony Paul
Hi all, This is giving error in 7.3.3. CREATE TEMP TABLE temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS; ERROR: parser: parse error at or near "ON" at character 51 Is this supported. rgds Antony Paul ---(end of broadcast)--- TIP 8: ex

Re: [GENERAL] checking SQL statement/subexpression validity

2005-02-08 Thread Tom Lane
Mike Nolan <[EMAIL PROTECTED]> writes: >> I need to check whether a SQL subexpression (to be used in WHERE >> clause), e.g.: > I've never tested it from Perl, but could you use 'explain select' > to see if it parses? It won't actually execute it if it does. Consider input along the line of

Re: [GENERAL] Database permissions

2005-02-08 Thread Art Fore
More confused than ever. The pg_hba.conf file shown below was what I had originaly to get phppgadmin to work. Changed the local all all ident md5 to local all all trust and it started to working again with phppgad

[GENERAL] Backup restore does not work

2005-02-08 Thread Art Fore
Using PGadminIII, I backup my database on linux machine, and try to restore it on the windows machine. Alway comes up with duplicate key on the first item. I drop all views and the only table in the database and try again. Still same thing. I do a refrresh, none of the views or table were drop

Re: [GENERAL] checking SQL statement/subexpression validity

2005-02-08 Thread Mike Nolan
> I need to check whether a SQL subexpression (to be used in WHERE > clause), e.g.: I've never tested it from Perl, but could you use 'explain select' to see if it parses? It won't actually execute it if it does. -- Mike Nolan ---(end of broadcast)---

[GENERAL] how to delete from a view

2005-02-08 Thread Rick Schumeyer
I know how to create a rule to delete from a view.  But I can’t figure this one out.   Let’s say I have two tables, t1 and t2, and a view tview that uses columns from both t1 and t2.  I don’t want users to have access to t1 and t2, only to tview.  I have a rule that handles inserts an

[GENERAL] checking SQL statement/subexpression validity

2005-02-08 Thread David Garamond
I need to check whether a SQL subexpression (to be used in WHERE clause), e.g.: colname > 200 or an entire SELECT statement, e.g.: SELECT * FROM t1, t2 WHERE colname > 200 is syntactically valid. Is there a quick (and also safe) way to do this? I'm thinking of doing "SELECT ... FROM ... WHERE

[GENERAL] Database permissions

2005-02-08 Thread Art Fore
I had this working once before, but restarted the database and things went to hell. This user authentication for postgresql I will have to say is the most complex I have seen. Need a block diagram of how it works to understand it. Have .pgpass in postgres home directory, data directory is /hom

Re: [GENERAL] Hoow do you drop a column in a table

2005-02-08 Thread Art Fore
Thanks for the answers. I recreated the views. Did not realize when you renamed a column, it also changed the views. Art Robby Russell wrote: On Tue, 2005-02-08 at 16:37 -0800, Art Fore wrote: Using phppgadmin, I tried tropping a column in a table. I comes back to try DROP .. CASCADE. Went into

Re: [GENERAL] Hoow do you drop a column in a table

2005-02-08 Thread Robby Russell
On Tue, 2005-02-08 at 16:37 -0800, Art Fore wrote: > Using phppgadmin, I tried tropping a column in a table. I comes back to > try DROP .. CASCADE. Went into psql and typed the following, > > ALTER TABLE "MPC" DROP COLUMNG do_not_use CASCADE > > It appeared to work but did not drop the column.

Re: [GENERAL] Hoow do you drop a column in a table

2005-02-08 Thread John DeSoi
Hi Art, On Feb 8, 2005, at 7:37 PM, Art Fore wrote: ALTER TABLE "MPC" DROP COLUMNG do_not_use CASCADE It appeared to work but did not drop the column. What is the dprocedure for dropping a column? an anyone point me to a document that tells EXACTLY how to do this? Also, how do you find out the

[GENERAL] Hoow do you drop a column in a table

2005-02-08 Thread Art Fore
Using phppgadmin, I tried tropping a column in a table. I comes back to try DROP .. CASCADE. Went into psql and typed the following, ALTER TABLE "MPC" DROP COLUMNG do_not_use CASCADE It appeared to work but did not drop the column. What is the dprocedure for dropping a column? an anyone point m

Re: [GENERAL] What talk would get you to go to OSCon?

2005-02-08 Thread Aaron Glenn
On Tue, 8 Feb 2005 14:29:08 -0500, Robert Treat <[EMAIL PROTECTED]> wrote: > Slony Yes. > High Availability Yes. > If you have other ideas please feel free to chime in, we'd really like to see > an uptick in postgresql attendees. Will Bruce and Tom be attending this year like they did in 2002?

Re: [GENERAL] PL/pgSQL bug: FOUND variable is not updated correct

2005-02-08 Thread Neil Conway
On Tue, 2005-02-08 at 18:11 -0500, Tom Lane wrote: > Vitaly Belman <[EMAIL PROTECTED]> writes: > > Doing an EXECUTE for a query which returns results still yields 'f' > > for the FOUND variable. > > This is not a bug. Read the list of statements that update FOUND. > EXECUTE is not one of them. S

Re: [GENERAL] PL/pgSQL bug: FOUND variable is not updated correct with EXECUTE

2005-02-08 Thread Tom Lane
Vitaly Belman <[EMAIL PROTECTED]> writes: > Doing an EXECUTE for a query which returns results still yields 'f' > for the FOUND variable. This is not a bug. Read the list of statements that update FOUND. EXECUTE is not one of them. regards, tom lane -

Re: [GENERAL] What talk would get you to go to OSCon?

2005-02-08 Thread Mike Rylander
My $0.02: On Tue, 8 Feb 2005 14:29:08 -0500, Robert Treat <[EMAIL PROTECTED]> wrote: > Hey folks, > > I'm working with a few others to put together a solid line up of talks for > this years OSCon and we'd like to get a straw poll of what talks you would > most like to see. Not just "that would b

[GENERAL] PL/pgSQL bug: FOUND variable is not updated correct with EXECUTE

2005-02-08 Thread Vitaly Belman
Doing an EXECUTE for a query which returns results still yields 'f' for the FOUND variable. "GET DIAGNOSTICS" on the other hand, works fine, Using version 8 on Win32. -- ICQ: 1912453 AIM: VitalyB1984 MSN: [EMAIL PROTECTED] Yahoo!: VitalyBe ---(end of broadcast)--

Re: [GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread Oisin Glynn
If this is a windows box I have noticed that the TIME_WAIT lasts far longer than on linux/unix. It is defined as a multiple of double of another TCPIP timer in the registry! Oisin - Original Message - From: "Lonni J Friedman" <[EMAIL PROTECTED]> To: "CSN" <[EMAIL PROTECTED]> Cc: Sent: T

Re: [GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread Lonni J Friedman
On Tue, 8 Feb 2005 13:44:48 -0800 (PST), CSN <[EMAIL PROTECTED]> wrote: > > --- Lonni J Friedman <[EMAIL PROTECTED]> wrote: > > > On Tue, 8 Feb 2005 13:17:38 -0800 (PST), CSN > > <[EMAIL PROTECTED]> wrote: > > > Is this anything to worry about? Why are there so > > many > > > Postgresql connectio

Re: [GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread CSN
It's on Linux (Redhat 9). CSN --- Oisin Glynn <[EMAIL PROTECTED]> wrote: > If this is a windows box I have noticed that the > TIME_WAIT lasts far longer > than on linux/unix. It is defined as a multiple of > double of another TCPIP > timer in the registry! > > > Oisin __

Re: [GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread CSN
--- Lonni J Friedman <[EMAIL PROTECTED]> wrote: > On Tue, 8 Feb 2005 13:17:38 -0800 (PST), CSN > <[EMAIL PROTECTED]> wrote: > > Is this anything to worry about? Why are there so > many > > Postgresql connections? 'ps axu' usually only > shows > > about 5-10 postgres processes. > > > > # netstat

Re: [GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread Lonni J Friedman
On Tue, 8 Feb 2005 13:17:38 -0800 (PST), CSN <[EMAIL PROTECTED]> wrote: > Is this anything to worry about? Why are there so many > Postgresql connections? 'ps axu' usually only shows > about 5-10 postgres processes. > > # netstat > tcp0 0 localhost.localdo:55547 > localhost.loca:postg

[GENERAL] Netstat - Lots of PG Connections

2005-02-08 Thread CSN
Is this anything to worry about? Why are there so many Postgresql connections? 'ps axu' usually only shows about 5-10 postgres processes. # netstat tcp0 0 localhost.localdo:55547 localhost.loca:postgres TIME_WAIT tcp0 0 localhost.localdo:55780 localhost.loca:postgres ESTA

[GENERAL] Removing duplicates

2005-02-08 Thread Bruno Wolff III
Please use a relevant subject for your posts. On Tue, Feb 08, 2005 at 23:14:57 +0530, Surabhi Ahuja <[EMAIL PROTECTED]> wrote: > i have a table in which duplicate rows occur. > > now i have to remove the duplicates. Please note that however, only the > duplicate rows have to be deleted and n

[GENERAL] hi

2005-02-08 Thread awitney
Norman Virus Control a supprimé la pièce-jointe game_xxo.txt.exe qui contenait le virus [EMAIL PROTECTED] Here is it! Attachment: No Virus found F-Secure AntiVirus - www.f-secure.com ---(end of broadcast)--- TIP 2: you can get off all

[GENERAL] What talk would get you to go to OSCon?

2005-02-08 Thread Robert Treat
Hey folks, I'm working with a few others to put together a solid line up of talks for this years OSCon and we'd like to get a straw poll of what talks you would most like to see. Not just "that would be cool" but ones that would get you to go book your plane tickets next weekend :-) So far so

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
That was it. i've two hb_conf-Files on my system. Now I can connect without any problems. thx --- Ursprüngliche Nachricht --- Datum: 08.02.2005 20:06 Von: Scott Marlowe <[EMAIL PROTECTED]> An: [EMAIL PROTECTED] Betreff: Re: [GENERAL] Cannot connect to Database > Is postgresql on the same machi

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
I've already shutdown my firewall. My OS is Linux (SuSE 9.2 64Bit) My postgre version is 7.4.6 and the port is on listen-mode [EMAIL PROTECTED]:/home/bernd> netstat -an | grep 5432 tcp0 0 0.0.0.0:54320.0.0.0:* LISTEN tcp0 0 :::5432 :::* LISTE

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Scott Marlowe
Is postgresql on the same machine as your applicaiton? Are you sure postgresql is starting up in the directory you think it is? On Tue, 2005-02-08 at 12:44, [EMAIL PROTECTED] wrote: > > Did you restart Postgresql after editing your pg_hba.conf file? > > Yes, I did. > > thx, > Bernd > > --- Ur

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Tom Lane
[EMAIL PROTECTED] writes: > everytime I try to connect to my Database with a Java-Applikation, I > recieve only the following Exception: > org.postgresql.util.PSQLException: A connection error has occurred: > org.postgresql.util.PSQLException: FATAL: kein pg_hba.conf-Eintrag für > Host »127.0.0.1«

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Lonni J Friedman
Well, its obviosly not listening on localhost. Are you firewalling anywhere? Which OS is this? Which version of postgresql? If this is Linux, what do you get from running 'netstat -an | grep 5432' ? On Tue, 08 Feb 2005 19:44:26 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Did you re

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
> Did you restart Postgresql after editing your pg_hba.conf file? Yes, I did. thx, Bernd --- Ursprüngliche Nachricht --- Datum: 08.02.2005 19:31 Von: Scott Marlowe <[EMAIL PROTECTED]> An: [EMAIL PROTECTED] Betreff: Re: [GENERAL] Cannot connect to Database > Did you restart Postgresql after edi

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Scott Marlowe
Did you restart Postgresql after editing your pg_hba.conf file? On Tue, 2005-02-08 at 12:22, [EMAIL PROTECTED] wrote: > I recvive still the same error-message. > > thx, > Bernd > > --- UrsprÃngliche Nachricht --- > Datum: 08.02.2005 19:14 > Von: "Joshua D. Drake" <[EMAIL PROTECTED]> > An: [EMAI

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
I still recive the same error-message thx, Bernd --- Ursprüngliche Nachricht --- Datum: 08.02.2005 19:13 Von: javier wilson <[EMAIL PROTECTED]> An: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Betreff: Re: [GENERAL] Cannot connect to Database > have you tried connecting to it with other tool, like "

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
I recvive still the same error-message. thx, Bernd --- Ursprüngliche Nachricht --- Datum: 08.02.2005 19:14 Von: "Joshua D. Drake" <[EMAIL PROTECTED]> An: [EMAIL PROTECTED] Betreff: Re: [GENERAL] Cannot connect to Database > [EMAIL PROTECTED] wrote: > >>Do you have TCP/IP activated in postgresql

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Joshua D. Drake
[EMAIL PROTECTED] wrote: Do you have TCP/IP activated in postgresql.conf ? Are you trying to connect via localhost (127.0.0.1) or some other route? I start the Server with the -i option, so TCP/IP is activated, isn't it? I want to connect by localhost to my database. From the localhost can you: p

Re: [GENERAL]

2005-02-08 Thread Jonel Rienton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Surabhi, search the archives, this has been discussed quite a few times in the pass. regards, - - Jonel Rienton http://blogs.road14.com Software Developer, *nix Advocate On Feb 8, 2005, at 11:44 AM, Surabhi Ahuja wrote: > i have a table in w

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
> Do you have TCP/IP activated in postgresql.conf ? Are you trying to > connect via localhost (127.0.0.1) or some other route? I start the Server with the -i option, so TCP/IP is activated, isn't it? I want to connect by localhost to my database. thx, Bernd --- Ursprüngliche Nachricht --- Dat

Re: [GENERAL] Confused by to_char

2005-02-08 Thread mike
On Tue, 2005-02-08 at 13:00 +, Ragnar Hafstaà wrote: > On Tue, 2005-02-08 at 12:28 +, mike wrote: > > I am am trying to get a day string from a date using to_char ie: > > > > SELECT date1,ti1 ,to1,ti2,to2,adj,ei,eo,to_char('2005-02-07','Day') FROM > > vw_times_list1 > > > > however I get

Re: [GENERAL] Cannot connect to Database

2005-02-08 Thread Lonni J Friedman
On Tue, 08 Feb 2005 18:46:00 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > everytime I try to connect to my Database with a Java-Applikation, I > recieve only the following Exception: > > org.postgresql.util.PSQLException: A connection error has occurred: > org.postgresql.util.PSQ

[GENERAL] Cannot connect to Database

2005-02-08 Thread bernd
Hi, everytime I try to connect to my Database with a Java-Applikation, I recieve only the following Exception: org.postgresql.util.PSQLException: A connection error has occurred: org.postgresql.util.PSQLException: FATAL: kein pg_hba.conf-Eintrag für Host »127.0.0.1«, Benutzer »postgres«, Datenba

[GENERAL]

2005-02-08 Thread Surabhi Ahuja
i have a table in which duplicate rows occur.   now i have to remove the duplicates. Please note that however, only the duplicate rows have to be deleted and not the original one.   How do i do it?

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Oleg Bartunov
On Tue, 8 Feb 2005, Larry Rosenman wrote: Oleg Bartunov wrote: On Tue, 8 Feb 2005, Larry Rosenman wrote: Oleg Bartunov wrote: On Tue, 8 Feb 2005, Larry Rosenman wrote: It doesn't seem to like pieces with hyphens ('-') in the name, when I try To update blacklist set new_domain_lt=text2ltree(domain)

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Larry Rosenman
Oleg Bartunov wrote: > On Tue, 8 Feb 2005, Larry Rosenman wrote: > >> Oleg Bartunov wrote: >>> On Tue, 8 Feb 2005, Larry Rosenman wrote: >>> It doesn't seem to like pieces with hyphens ('-') in the name, when I try To update blacklist set new_domain_lt=text2ltree(domain) I ge

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Oleg Bartunov
On Tue, 8 Feb 2005, Larry Rosenman wrote: Oleg Bartunov wrote: On Tue, 8 Feb 2005, Larry Rosenman wrote: It doesn't seem to like pieces with hyphens ('-') in the name, when I try To update blacklist set new_domain_lt=text2ltree(domain) I get a Syntax error (apparently for the hyphens). Try change d

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Larry Rosenman
Oleg Bartunov wrote: > On Tue, 8 Feb 2005, Larry Rosenman wrote: > >> >> It doesn't seem to like pieces with hyphens ('-') in the name, when I >> try To update blacklist set new_domain_lt=text2ltree(domain) I get a >> Syntax error (apparently for the hyphens). >> > > Try change definition of IS

Re: [GENERAL] create aggregates to concatenate

2005-02-08 Thread Berend Tober
>> i just wanted to share this with you, i wanted to do something like >> this for a long time but just recently found out about "create >> aggregate" reading old posts, so here it is, using user-defined >> aggregate functions to concatenate results. >> >> when it's numbers i usually use SUM to com

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Oleg Bartunov
On Tue, 8 Feb 2005, Larry Rosenman wrote: It doesn't seem to like pieces with hyphens ('-') in the name, when I try To update blacklist set new_domain_lt=text2ltree(domain) I get a Syntax error (apparently for the hyphens). Try change definition of ISALNUM on ltree.h #define ISALNUM(x) ( isaln

Re: [GENERAL] create aggregates to concatenate

2005-02-08 Thread Berend Tober
> i just wanted to share this with you, i wanted to do something like > this for a long time but just recently found out about "create > aggregate" reading old posts, so here it is, using user-defined > aggregate functions to concatenate results. > > when it's numbers i usually use SUM to compute t

Re: [GENERAL] [COMMITTERS] How I can add new function writing on C under Win32

2005-02-08 Thread Bruce Momjian
deeps1 wrote: > Hello pgsql-committers, > > > > How I can compiling and linking Dynamically-Loaded Functions on Win32? > > In Docs describe all platforms BSD , FreeBSD, > > > Linux for example > The compiler flag to create PIC is -fpic. On some platforms in some > situations -fPIC must be u

Re: [GENERAL] Help with sorting (ie. ORDER BY expression)

2005-02-08 Thread Berend Tober
> This can be easily done with pl/pgsql, visit the documentation at > http://www.postgresql.org/docs/7.3/interactive/programmer-pl.html > OT: seems like this is a questionnaire/survey application, yes? > - - > Jonel Rienton FWIW, given the signature: "Reuben D. Budiardja, Dept. Physics and As

Re: [GENERAL] Sorting when '*' is the initial character - solved

2005-02-08 Thread Berend Tober
> On Tue, 8 Feb 2005 01:10 pm, CoL wrote: >> hi, >> >> Berend Tober wrote, On 2/7/2005 22:20: >> > I encountered what looks like unusually sorting behavior, and I'm >> wondering if >> > anyone can tell me if this is supposted to happen (and then if so, why) or >> if >> > this is a bug: ---

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Larry Rosenman
Oleg Bartunov wrote: > On Tue, 8 Feb 2005, Larry Rosenman wrote: > >> On Tue, 8 Feb 2005, Oleg Bartunov wrote: >> >>> On Mon, 7 Feb 2005, Larry Rosenman wrote: >>> Oleg Bartunov wrote: >>> >>> Larry, I pointed you to pg_trgm module mostly following Martijn's >>> suggestions. Now, I see you

Re: [GENERAL] Problem performing a restore of a data schema in Wi

2005-02-08 Thread Berend Tober
> -Original Message- > From: John DeSoi [mailto:[EMAIL PROTECTED] > Sent: 07 February 2005 04:21 PM > To: Shaun Clements > Cc: 'PgSql General' > Subject: Re: [GENERAL] Problem performing a restore of a data schema in > Windows > > > > On Feb 7, 2005, at 8:22 AM, Shaun Clements wrote: > >> p

Re: [GENERAL] Performance tuning using copy

2005-02-08 Thread Martijn van Oosterhout
On Tue, Feb 08, 2005 at 05:15:55AM -0800, sid tow wrote: > Hi, > > I have to know why does copy commands work faster as compared to > the insert commands. The thing is that i have a lot of > constraints and triggers. I know insert will check all the > triggers and constraints,

Re: [GENERAL] indexing just a part of a string

2005-02-08 Thread Ian Harding
You can use a functional index. Something like CREATE INDEX foo ON bar (substring(blah,1,200)) Should work I think. Ian Harding Programmer/Analyst II Tacoma-Pierce County Health Department [EMAIL PROTECTED] Phone: (253) 798-3549 Pager: (253) 754-0002 >>> Christoph Pingel <[EMAIL PROTECTED]> 0

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Oleg Bartunov
On Tue, 8 Feb 2005, Larry Rosenman wrote: On Tue, 8 Feb 2005, Oleg Bartunov wrote: On Mon, 7 Feb 2005, Larry Rosenman wrote: Oleg Bartunov wrote: Larry, I pointed you to pg_trgm module mostly following Martijn's suggestions. Now, I see you need another our module - ltree, see http://www.sai.msu.su

Re: [GENERAL] Safely Killing Backends (Was: Applications that leak connections)

2005-02-08 Thread Martijn van Oosterhout
On Tue, Feb 08, 2005 at 07:31:13AM -0500, Jim Wilson wrote: > That\'s unfortunate. I\'ve tried to explain my position off list to > Marco, but it really isn\'t worth debating. FWIW I think this thread > was started by someone with application issues. The fact is, such > things happen. Well, I r

Re: [GENERAL] Safely Killing Backends (Was: Applications that leak connections)

2005-02-08 Thread Marco Colombo
On Tue, 8 Feb 2005, Jim Wilson wrote: Your application should handle failures in the middle of a transaction, connection failures included, in a graceful but correct way. It does very well, until the next bug is discovered. I see your point (being able to safely shut a connection down on the server

Re: [GENERAL] Update command too slow

2005-02-08 Thread Doug McNaught
Venkatesh Babu <[EMAIL PROTECTED]> writes: > Hello, > > Thanks for providing info... I tried disabling > autocommit, as suggested by Mr. Greg Stark, I tried > issuing the command "set autocommit to off", but got > the following error message: > > ERROR: SET AUTOCOMMIT TO OFF is no longer supporte

Re: [GENERAL] Creating an index-type for LIKE '%value%'

2005-02-08 Thread Larry Rosenman
On Tue, 8 Feb 2005, Oleg Bartunov wrote: On Mon, 7 Feb 2005, Larry Rosenman wrote: Oleg Bartunov wrote: Larry, I pointed you to pg_trgm module mostly following Martijn's suggestions. Now, I see you need another our module - ltree, see http://www.sai.msu.su/~megera/postgres/gist/ltree/ for details.

[GENERAL] Performance tuning using copy

2005-02-08 Thread sid tow
Hi,   I have to know why does copy commands work faster as compared to the insert commands. The thing is that i have a lot of constraints and triggers. I know insert will check all the triggers and constraints, but i wonder if copy will also do it and then if it does then this has also to be s

Re: [GENERAL] Update command too slow

2005-02-08 Thread Venkatesh Babu
Hi, The where clause is used in update statements and the column present in the where clause is indexed... but still updates are slow. Thanks, Venkatesh --- guegue <[EMAIL PROTECTED]> wrote: > you mention you use one update statement by record, > this may be to > basic but anyway, it just happ

Re: [GENERAL] Confused by to_char

2005-02-08 Thread Chris Green
On Tue, Feb 08, 2005 at 12:28:26PM +, mike wrote: > I am am trying to get a day string from a date using to_char ie: > > SELECT date1,ti1 ,to1,ti2,to2,adj,ei,eo,to_char('2005-02-07','Day') FROM > vw_times_list1 > > however I get > > function to_char("unknown", "unknown") is not unique > >

Re: [GENERAL] Confused by to_char

2005-02-08 Thread Ragnar Hafstað
On Tue, 2005-02-08 at 12:28 +, mike wrote: > I am am trying to get a day string from a date using to_char ie: > > SELECT date1,ti1 ,to1,ti2,to2,adj,ei,eo,to_char('2005-02-07','Day') FROM > vw_times_list1 > > however I get > > function to_char("unknown", "unknown") is not unique test=# sele

[GENERAL] Confused by to_char

2005-02-08 Thread mike
I am am trying to get a day string from a date using to_char ie: SELECT date1,ti1 ,to1,ti2,to2,adj,ei,eo,to_char('2005-02-07','Day') FROM vw_times_list1 however I get function to_char("unknown", "unknown") is not unique (using to_date does not recognise the date format) anyone any ideas what

Re: [GENERAL] Safely Killing Backends (Was: Applications that leak connections)

2005-02-08 Thread Jim Wilson
> > Your application should handle failures in the middle of a transaction, > connection failures included, in a graceful but correct way. It does very well, until the next bug is discovered. > > I see your point (being able to safely shut a connection down on the > server side), but it\'s at t

Re: [GENERAL] indexing just a part of a string

2005-02-08 Thread Alban Hertroys
Christoph Pingel wrote: So I would like to say 'index only the first 200 chars of the column', which will result in a full index of 99.9 % of my entries. I did this in MySQL, but I didn't find it in the pg manual. How do I proceed? You could do: CREATE INDEX ON (SUBSTRING(, 1, 200)) But that m

Re: [GENERAL] Out of memory error

2005-02-08 Thread Clodoaldo Pinto
On Tue, 8 Feb 2005 09:06:38 -0200, Clodoaldo Pinto <[EMAIL PROTECTED]> wrote: > I did: > # /sbin/sysctl -w vm.overcommit_memory=2 > following > http://www.postgresql.org/docs/7.4/static/kernel-resources.html#AEN17068 > > And got the same error: > > ERROR: out of memory > DETAIL: Failed on reque

Re: [GENERAL]

2005-02-08 Thread Shaun Clements
Title: RE: [GENERAL] You would need to use EXCEPTION, to trap the error. Kind Regards, Shaun Clements -Original Message- From: Jan Poslusny [mailto:pajout@gingerall.cz] Sent: 08 February 2005 12:01 PM To: Surabhi Ahuja Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] You

Re: [GENERAL] Out of memory error

2005-02-08 Thread Clodoaldo Pinto
I did: # /sbin/sysctl -w vm.overcommit_memory=2 following http://www.postgresql.org/docs/7.4/static/kernel-resources.html#AEN17068 And got the same error: ERROR: out of memory DETAIL: Failed on request of size 44. CONTEXT: PL/pgSQL function "group_dup" line 9 at SQL statement The difference n

Re: [GENERAL] External Projects in the PostgreSQL release

2005-02-08 Thread Martijn van Oosterhout
On Mon, Feb 07, 2005 at 02:10:32PM -0800, Noah Friedland wrote: > Hi! > > I was wondering if any external projects get bundled into the Postgres > release, e.g. JDBC, etc. I'd like to get a better sense of the process. How > are decisions made as to which external projects to bundle, and who is >

[GENERAL] indexing just a part of a string

2005-02-08 Thread Christoph Pingel
I'm new to PostgreSQL, and it has been a pleasure so far. There's just one thing I'm trying to do and I didn't find any hints in the manual: I want to index just a part of a string in a column. The situation: I have roughly 300.000 rows, and in the column we're looking at, most of the entries ha

Re: [GENERAL]

2005-02-08 Thread Jan Poslusny
If you want to realize your insert chain in plpgsql, trapping exceptions is a good idea, imho. But I am not experienced with these new features in pg 8.0 ... Surabhi Ahuja wrote: cant the same be done by trapping the errors. by trapping these exceptions? http://www.postgresql.org/docs/8.0/inte

Re: [GENERAL]

2005-02-08 Thread Surabhi Ahuja
Title: Re: [GENERAL] cant the same be done by trapping the errors. by trapping these exceptions?  http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-structures.html   search for "trapping errors" ? From: Jan Poslusny [mailto:[EMAIL PROTECTED]Sent: Tue 2/8/2005 3:30 PMTo: Sura

Re: [GENERAL] Update command too slow

2005-02-08 Thread Venkatesh Babu
Hello, Thanks for providing info... I tried disabling autocommit, as suggested by Mr. Greg Stark, I tried issuing the command "set autocommit to off", but got the following error message: ERROR: SET AUTOCOMMIT TO OFF is no longer supported Also, I can't implement the suggestions of Mr. Christop

Re: [GENERAL]

2005-02-08 Thread Jan Poslusny
You can use savepoints in pg 8.0: http://www.postgresql.org/docs/8.0/static/sql-savepoint.html Surabhi Ahuja wrote: in a transaction i try to insert into a table1, followed by insert into table 2 then insert into table 3 and last insert into table 4. However if a unique key violation occurs in t

Re: [GENERAL] Sorting when "*" is the initial character

2005-02-08 Thread Russell Smith
On Tue, 8 Feb 2005 01:10 pm, CoL wrote: > hi, > > Berend Tober wrote, On 2/7/2005 22:20: > > I encountered what looks like unusually sorting behavior, and I'm wondering > > if > > anyone can tell me if this is supposted to happen (and then if so, why) or > > if > > this is a bug: > > > > > > S

Re: [GENERAL] Update command too slow

2005-02-08 Thread guegue
you mention you use one update statement by record, this may be to basic but anyway, it just happened to me... do you use the WHERE clause in your UPDATE statement, and if so is the column you use to filter indexed? javier On Sat, 5 Feb 2005 03:14:52 -0800 (PST), Venkatesh Babu <[EMAIL PROTECTE

Re: [GENERAL] Update command too slow

2005-02-08 Thread guegue
How are you updating this tables? Do you use UPDATE WHERE On Fri, 4 Feb 2005 05:57:32 -0800 (PST), Venkatesh Babu <[EMAIL PROTECTED]> wrote: > Hello, > > We have a table cm_quotastates which has exactly > 4624564 rows and 25 columns and 9 indexes... Out of > these, our code retrieves 7

[GENERAL] create aggregates to concatenate

2005-02-08 Thread javier wilson
i just wanted to share this with you, i wanted to do something like this for a long time but just recently found out about "create aggregate" reading old posts, so here it is, using user-defined aggregate functions to concatenate results. when it's numbers i usually use SUM to compute totals, but

[GENERAL]

2005-02-08 Thread Surabhi Ahuja
 in a transaction i try to insert into a table1, followed by insert into table 2 then insert into table 3 and last insert into table 4. However if a unique key violation occurs in the table 1 , the whole trabnsaction aborts. is there no way , where i can ignore this violation, and continue with