Re: [GENERAL] Converting number to words

2004-11-05 Thread Bruce Momjian
Alvaro Herrera wrote: > On Fri, Nov 05, 2004 at 05:18:01PM -0500, Robert Fitzpatrick wrote: > > I searched through the net quickly and the list archives, but could not > > find anything doing this. Is it possible? There is a Perl module for > > doing this, but I guess cannot use modules for securit

Re: [GENERAL] Using EXECUTE in same manner as SELECT

2004-11-05 Thread Neil Conway
Andrew Lazarus wrote: Is there some clear reason why I can't using EXECUTE of a PREPAREd query as I can a SELECT statement in CREATE TABLE AS, INSERT, FROM clause, sub-selects, etc.? If not, wouldn't this be a very useful change? You can already do CREATE TABLE AS ... EXECUTE. I agree being able

Re: [GENERAL] Gborg down?

2004-11-05 Thread Joshua D. Drake
Ya well, its not something I'm particularly proud about ... Stupid question for someone running Linux ... is this standard behaviour that I've been lucky never to hit before, or is this something that Linux deals with slightly more intelligently? Well in linux you would do something like this: i

Re: [GENERAL] Gborg down?

2004-11-05 Thread Marc G. Fournier
On Fri, 5 Nov 2004, Joshua D. Drake wrote: I've posted details to the FreeBSD -stable and -current mailing list, but the simple summary is that 'ifconfig -alias' with no ip specific'd literally erases all IPs on that device, leaving the server running 'un-networked' ... :( Good lord. Ya well,

Re: [GENERAL] Gborg down?

2004-11-05 Thread Joshua D. Drake
I've posted details to the FreeBSD -stable and -current mailing list, but the simple summary is that 'ifconfig -alias' with no ip specific'd literally erases all IPs on that device, leaving the server running 'un-networked' ... :( Good lord. Sincerely, Joshua D. Drake Marc G. Fournier

Re: [GENERAL] Copy command and import - MS SQL Server to Postgres

2004-11-05 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: >>> My input file has the timestamp value like >>> 2004-09-30 11:31:00.000 > What about the ".000" on the end? I am not able to enter that format in > a timestamp field in 7.4.5, it is invalid. Nonsense. regression=# select '2004-09-30 11:31:00.000

Re: [GENERAL] Gborg down?

2004-11-05 Thread Joshua D. Drake
Jerry LeVan wrote: I don't seem to be able to connect to gborg.postgresql.org this evening... Hello, I can second this. Gborg is down. Sincerely, Joshua D. Drake Jerry ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster -- Command Prompt,

Re: [GENERAL] Gborg down?

2004-11-05 Thread Marc G. Fournier
On Fri, 5 Nov 2004, Jerry LeVan wrote: I don't seem to be able to connect to gborg.postgresql.org this evening... Already working on it ... I found an undocumented 'feature' in FreeBSD today while doing some cleanups ... we ordered a terminal server to allow us to do remote admin on the servers,

[GENERAL] Gborg down?

2004-11-05 Thread Jerry LeVan
I don't seem to be able to connect to gborg.postgresql.org this evening... Jerry ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Copy command and import - MS SQL Server to Postgres

2004-11-05 Thread Goutam Paruchuri
Title: Re: [GENERAL] Copy command and import - MS SQL Server to Postgres I tried by taking the .000 still the same issue.   WITH NULL AS '' works fine. WITH NULL AS NULL gives an error as well.   - Goutam   From: Robert Fitzpatrick [mailto:[EMAIL PROTECTED]Sent: Fri 11/5/2004 5:33 PMTo:

Re: [GENERAL] Retrieve ip client from postgres

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 04:21:52PM -0400, Mario A. Soto Cordones wrote: > How can i get the Client Host name/IP Address for the current > connection(session). Is there any function or system table(view) which > will these details. In 8.0 you'll be able to use inet_client_addr(). I don't think yo

Re: [GENERAL] Converting number to words

2004-11-05 Thread Alvaro Herrera
On Fri, Nov 05, 2004 at 05:18:01PM -0500, Robert Fitzpatrick wrote: > I searched through the net quickly and the list archives, but could not > find anything doing this. Is it possible? There is a Perl module for > doing this, but I guess cannot use modules for security reasons. But you can use pl

Re: [GENERAL] Copy command and import - MS SQL Server to Postgres

2004-11-05 Thread Robert Fitzpatrick
On Fri, 2004-11-05 at 16:48, Allen Landsidel wrote: > On Fri, 5 Nov 2004 16:31:21 -0500, Goutam Paruchuri > <[EMAIL PROTECTED]> wrote: > > > > Iam trying to import data from ms-sql server to postgres. I export the data > > which has datetime columns in sql server using BCP. I use the following to

[GENERAL] Converting number to words

2004-11-05 Thread Robert Fitzpatrick
I searched through the net quickly and the list archives, but could not find anything doing this. Is it possible? There is a Perl module for doing this, but I guess cannot use modules for security reasons. -- Robert ---(end of broadcast)--- TIP 2:

Re: [GENERAL] ALERT This mailing list may be voted into a newsgroup

2004-11-05 Thread Marc G. Fournier
On Fri, 5 Nov 2004, Steve Atkins wrote: There may be significant pressure to change the gateway to a two-way gateway, sending all usenet posts to the mailing list, as part of the "doing the paperwork" process. That may cause problems. On the other hand without the full two-way gateway there's a

Re: [GENERAL] Copy command and import - MS SQL Server to Postgres

2004-11-05 Thread Allen Landsidel
On Fri, 5 Nov 2004 16:31:21 -0500, Goutam Paruchuri <[EMAIL PROTECTED]> wrote: > > Iam trying to import data from ms-sql server to postgres. I export the data > which has datetime columns in sql server using BCP. I use the following to > import back into postgres. > > copy tablename from 'c:\\bc

[GENERAL] Copy command and import - MS SQL Server to Postgres

2004-11-05 Thread Goutam Paruchuri
Iam trying to import data from ms-sql server to postgres. I export the data which has datetime columns in sql server using BCP. I use the following to import back into postgres.   copy tablename from 'c:\\bcpdata\\mcfa\\tablename.txt' with delimiter as '\t'   I get the following error !! inv

[GENERAL] Are there any PostgreSQL bloggers?

2004-11-05 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Are there any people in this community who keep blogs of their PostgreSQL lives? We are working on a "planet" project (like planetapache.org) and I'd like to see many people there :) If you are interested in this, please drop me an e-mail off-li

Re: [GENERAL] Trigger Parameter problem

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 01:18:03PM -0400, Mario A. Soto Cordones wrote: > anybody know how to sen a parameter an a trigger. If you're writing triggers in PL/pgSQL then perhaps you're looking for TG_ARGV. See also the syntax for CREATE TRIGGER. http://www.postgresql.org/docs/7.4/static/plpgsql-t

Re: [GENERAL] ALERT This mailing list may be voted into a newsgroup

2004-11-05 Thread Steve Atkins
(All as I understand it. If Marc or someone else who's involved wants to correct and clarify it'd be appreciated.) This mailing list is already gatewayed to comp.databases.postgresql.general (that's where the spammers harvest your email address if you post to the list). This is nothing new. It ha

[GENERAL] Retrieve ip client from postgres

2004-11-05 Thread Mario A. Soto Cordones
Hi, How can i get the Client Host name/IP Address for the current connection(session). Is there any function or system table(view) which will these details. Thank ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an i

Re: [GENERAL] [ADMIN] VACUUM failing ??!!

2004-11-05 Thread Tom Lane
"Salem Berhanu" <[EMAIL PROTECTED]> writes: > Version 7.4 > (I just re-indexed and I'm running vacuum again) I wonder if this is a variant of the concurrent-page-split problem Joe Conway found. That's fixed in 7.4.5 and later. Was this a plain vacuum, or vacuum full? rega

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Gregory S. Williamson
Sweet. I learn something every day. thanks for ideas, one and all! G -Original Message- From: Alvaro Herrera [mailto:[EMAIL PROTECTED] Sent: Fri 11/5/2004 8:49 AM To: Csaba Nagy Cc: [EMAIL PROTECTED]; Gregory S. Williamson; Postgres general mailing list Subject:Re: [GE

Re: [GENERAL] create a text file from postgres (like Oracle UTL_FILE package)

2004-11-05 Thread Thomas F.O'Connell
At this point, I'm not sure I'm understanding your question. I'll try restating my solution again: I would have, for example, a Perl script that used the DBI module to extract information from a given database and then let Perl handle any relevant text/data manipulation and file creation/manipu

[GENERAL] Trigger Parameter problem

2004-11-05 Thread Mario A. Soto Cordones
Hi. anybody know how to sen a parameter an a trigger. thank for your help Mario Soto ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Csaba Nagy
Cool, this goes to my "util" mail folder :-) [snip] > But it's still too cumbersome. How about creating a new operator? With > the example below the query would simply be > > SELECT s_host ||~ s_post_dir ||~ s_street ||~ s_suffix > FROM parcels > WHERE s_pin = '1201703303520'; > > alvherre=

Re: [GENERAL] [ADMIN] VACUUM failing ??!!

2004-11-05 Thread Salem Berhanu
Version 7.4 (I just re-indexed and I'm running vacuum again) From: Tom Lane <[EMAIL PROTECTED]> To: "Sally Sally" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [ADMIN] VACUUM failing ??!! Date: Fri, 05 Nov 2004 11:04:00 -0500 "Sally Sally" <[EMAIL PROTECTED]> writes:

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Alvaro Herrera
On Fri, Nov 05, 2004 at 12:51:11PM +0100, Csaba Nagy wrote: > [snip] > > SELECT TRIM(TRIM(TRIM(COALESCE(s_house,'') || ' ' || > > COALESCE(s_post_dir,'')) || ' ' || COALESCE(s_street ,'')) || ' ' || > > COALESCE(s_suffix,'')) FROM parcels WHERE s_pin = '1201703303520'; > > > > The TRIMs are to rem

[GENERAL] ALERT This mailing list may be voted into a newsgroup

2004-11-05 Thread Andy M
ALERT There is a person by the name of Mike Cox who's trying to turn this mailing list into a Big-8 newsgroup. Many of you know that this and most of the other postresql mailing lists are already gated to Google Groups and a small number of private news servers. If Mike Cox succeeds, this list wil

[GENERAL] Using EXECUTE in same manner as SELECT

2004-11-05 Thread Andrew Lazarus
Is there some clear reason why I can't using EXECUTE of a PREPAREd query as I can a SELECT statement in CREATE TABLE AS, INSERT, FROM clause, sub-selects, etc.? If not, wouldn't this be a very useful change? (Or is there some special syntax to do this that I can't find?) Andrew Lazarus [EMAIL

Re: [GENERAL] restoring pgdump file file from 7.2 branch to 7.4

2004-11-05 Thread Peter Eisentraut
Am Freitag, 5. November 2004 16:29 schrieb Bob Powell: > changing return type of function plpgsql_call_handler from opaque to > language_handler. Does this matter? Yes, but it's good that it happens. :) > I am sure that the pltcl.so is in the correct location. Would the > version issue of pltcl

Re: [GENERAL] start postmaster as root : problem

2004-11-05 Thread Tom Lane
[EMAIL PROTECTED] writes: > I have a Linux Distribuction that works only in single user mode as root. That's about as brain dead a setup as I've ever heard of :-(. Get a real operating system, not a CP/M emulation. > The postmaster daemon starts only if I 'm not root user. That's an intentio

Re: [GENERAL] restoring pgdump file file from 7.2 branch to 7.4

2004-11-05 Thread Tom Lane
"Bob Powell" <[EMAIL PROTECTED]> writes: > I am sure that the pltcl.so is in the correct location. Would the > version issue of pltcl.so matter? I'm using the pltcl.so from my older > 7.2 branch. Can't do that. In current releases it's considered bad practice to be using absolute paths for .so

Re: [GENERAL] start postmaster as root : problem

2004-11-05 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Fri, 5 Nov 2004 [EMAIL PROTECTED] wrote: I have to develop an embedded database with PostgreSQL. I have a Linux Distribuction that works only in single user mode as root. The postmaster daemon starts only if I 'm not root user. Do you have a

Re: [GENERAL] [ADMIN] VACUUM failing ??!!

2004-11-05 Thread Tom Lane
"Sally Sally" <[EMAIL PROTECTED]> writes: > After running for more than 24 hrs (I have a large db), vacuum failed with > this message: > ERROR: failed to re-find parent key in "pg_type_typname_nsp_index" What PG version? regards, tom lane ---(end

Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Tom Lane
Stuart Bishop <[EMAIL PROTECTED]> writes: > | If you want 24 hours you can use 24 hours. Days are not constant length, > | just like months aren't constant length. > Days *are* of constant length - check your nearest dictionary, which > will define it as 24 hours or the period of rotation of the e

[GENERAL] start postmaster as root : problem

2004-11-05 Thread stefari
Hi all, I have to develop an embedded database with PostgreSQL. I have a Linux Distribuction that works only in single user mode as root. The postmaster daemon starts only if I 'm not root user. Do you have a solution for this problem ?? Thanks. __

[GENERAL] restoring pgdump file file from 7.2 branch to 7.4

2004-11-05 Thread Bob Powell
Hello everyone:   I am attempting to upgrade from 7.2 to 7.4 Postgresql.  I have successfully installed 7.4 and am attempting to use the pgdump from 7.2 for 7.4.  I'm having only one slight error that I would like some help with.   I create

Re: [GENERAL] VACUUM failing ??!!

2004-11-05 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Fri, 5 Nov 2004, Sally Sally wrote: After running for more than 24 hrs (I have a large db), vacuum failed with this message: ERROR: failed to re-find parent key in "pg_type_typname_nsp_index" Has anybody encountered this before? AFAIR, you have

[GENERAL] VACUUM failing ??!!

2004-11-05 Thread Sally Sally
After running for more than 24 hrs (I have a large db), vacuum failed with this message: ERROR: failed to re-find parent key in "pg_type_typname_nsp_index" Has anybody encountered this before? Thanks much Sally _ Check out Election

Re: [GENERAL] Java / Perl Return codes

2004-11-05 Thread Csaba Nagy
Check out: src/include/utils/errcodes.h in the postgres source tree. In Java you will get these error codes using the getSQLState method on the SQLException. You should also check the JDBC source to any further JDBC specific codes, as it is possible to have JDBC side errors (i.e. not coming from th

[GENERAL] Java / Perl Return codes

2004-11-05 Thread Alex P
Hi, i would like to check for a given query (insert, update, delete) if there is a key or constraint violation which prevents the query from being executed. Is such a feature implemented in the perl or java drivers? If so, could anyone point to a list of available return codes? Thanks Alex -

Re: [GENERAL] Characters used for pattern matching with like

2004-11-05 Thread Tk421
Look at http://www.postgresql.org/docs/7.3/interactive/functions-matching.html Víctor Robador Capel Análisis de Sistemas y Programación www.creativosdolmen.com - Original Message - From: "Antony Paul" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 1:01 PM Su

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Csaba Nagy
[snip] > SELECT TRIM(TRIM(TRIM(COALESCE(s_house,'') || ' ' || > COALESCE(s_post_dir,'')) || ' ' || COALESCE(s_street ,'')) || ' ' || > COALESCE(s_suffix,'')) FROM parcels WHERE s_pin = '1201703303520'; > > The TRIMs are to remove surplus spaces from inside the result string. Avoiding the inner tri

[GENERAL] Characters used for pattern matching with like

2004-11-05 Thread Antony Paul
Hi all, What are the characters used for pattern matching with PostgreSQL 7.3. I know it is using % and _ . Any other characters ?. rgds Atnony Paul ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.po

Re: [GENERAL] TSearch2: Problems with compound words and stop words

2004-11-05 Thread Oleg Bartunov
On Fri, 5 Nov 2004, Timo Haberkern wrote: Oleg, i use TSearch2 with PostgreSQL 7.4.6 and i applied the compoundword patch yesterday. The configuration changed a little bit but the result is the same. I get no compound words. I'm using the locale de_DE with encoding ISO8859-1 for the database. I

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Michael Kleiser
SELECT COALESCE(s_house,'') || COALESCE(s_post_dir,'') || COALESCE(s_street,'') || COALESCE(s_suffix,'') FROM parcels WHERE s_pin = '1201703303520'; Gregory S. Williamson schrieb: This is postgres 7.4 on a linux box ... I have driven myself to distraction trying to what ought to be easy. I have a

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Gregory S. Williamson
Thanks to you and Richard for pointing me in the right direction (I had the wrong syntax on the coalesce function) ... too late at night here (too early in the morning?) and I much appreciate the help. The mysteries of NULL ... Greg W. -Original Message- From: Oliver Elphick [mailto

Re: [GENERAL] how to edit a function from psql?

2004-11-05 Thread Russ Brown
What would be really useful would be a command that would return the actual SQL needed to create a function. At present the output from \df+ needs to be pieced together to create a new CREATE OR REPLACE string. A command that returnes that string for you would allow you to copy and paste it in, do

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Oliver Elphick
On Fri, 2004-11-05 at 09:25, Gregory S. Williamson wrote: > This is postgres 7.4 on a linux box ... > > I have driven myself to distraction trying to what ought to be easy. > > I have a table with house number, street direction, street name and > street suffix as 4 columns. I want to paste them t

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 01:25:07AM -0800, Gregory S. Williamson wrote: > SELECT s_house,s_post_dir,s_street,s_suffix FROM parcels WHERE s_pin = > '1201703303520'; > s_house | s_post_dir |s_street| s_suffix > -+++-- > 34643 || FIG

Re: [GENERAL] OS X Install

2004-11-05 Thread Joel
(A little back-seat driving from me below:) On Thu, 4 Nov 2004 10:11:18 -0500 Jim Crate <[EMAIL PROTECTED]> favored us with > I'm a little late to the party, but figured I could at least offer some info for > the archives. > > If you don't know the user's password, and you have admin access, th

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Richard Huxton
Gregory S. Williamson wrote: SELECT s_house,s_post_dir,s_street,s_suffix FROM parcels WHERE s_pin = '1201703303520'; s_house | s_post_dir |s_street| s_suffix -+++-- 34643 | | FIG TREE WOODS | So to get "34643 FIG TREE WOODS" what do I do ? SEL

Re: [GENERAL] TSearch2: Problems with compound words and stop words

2004-11-05 Thread Timo Haberkern
Oleg, i use TSearch2 with PostgreSQL 7.4.6 and i applied the compoundword patch yesterday. The configuration changed a little bit but the result is the same. I get no compound words. I'm using the locale de_DE with encoding ISO8859-1 for the database. I think i spell is working correctly except

[GENERAL] Conactenating text with null values

2004-11-05 Thread Gregory S. Williamson
This is postgres 7.4 on a linux box ... I have driven myself to distraction trying to what ought to be easy. I have a table with house number, street direction, street name and street suffix as 4 columns. I want to paste them together as one text string for use by another application. SELECT s

Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Michael Glaesemann
On Nov 5, 2004, at 5:38 PM, Stuart Bishop wrote: Bruno Wolff III wrote: | On Fri, Oct 29, 2004 at 11:14:31 -0600, | Guy Fraser <[EMAIL PROTECTED]> wrote: | |>1 day should always be calculated as 24 hours, just as an hour |>is calculated as 60 minutes... | | | If you want 24 hours you can use 24 h

Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Wolff III wrote: | On Fri, Oct 29, 2004 at 11:14:31 -0600, | Guy Fraser <[EMAIL PROTECTED]> wrote: | |>1 day should always be calculated as 24 hours, just as an hour |>is calculated as 60 minutes... | | | If you want 24 hours you can use 24 hour

Re: [GENERAL] TSearch2: Problems with compound words and stop words

2004-11-05 Thread Oleg Bartunov
Timo, please, check you apply patch for compound word support. What is version of postgresql ? Does ispell dict works for non-compound words ? Oleg On Fri, 5 Nov 2004, Timo Haberkern wrote: Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as descri

Re: [GENERAL] TSearch2: Problems with compound words and stop words

2004-11-05 Thread Oleg Bartunov
Timo, I forward your message to openfts mailing list. Also, could you specify if locale settings are correct for your database and what dictionary you have downloaded. Oleg On Fri, 5 Nov 2004, Timo Haberkern wrote: Hi there, i have some troubles with my TSearch2 Installation. I have done th

[GENERAL] TSearch2: Problems with compound words and stop words

2004-11-05 Thread Timo Haberkern
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words I used the german myspell dictionary