Re: [GENERAL] Suggestion for Date/Time Functions Section

2005-08-19 Thread Stephan Szabo
On Fri, 19 Aug 2005, CSN wrote: > Hi, > > I suggestion for the date/time functions in the docs: > http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html > > I was trying to figure out how to do: > update table set next=now() + interval 'table.period > seconds'; > > I tried subquer

Re: [GENERAL] Postgresql Function Language question

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 11:34:52 -0500 mailte Tony Caduto folgendes: > Is it possible to write c style functions with Free Pascal? Please, if you open a new subject, then open also a new thread in this email-list. Your messages are always in a wrong thread. Regards, Andreas -- Andreas Kretschmer

Re: [GENERAL] [DOCS] Suggestion for Date/Time Functions Section

2005-08-19 Thread Michael Glaesemann
On Aug 20, 2005, at 1:59 PM, CSN wrote: I was trying to figure out how to do: update table set next=now() + interval 'table.period seconds'; create table foo ( foo_id serial not null unique , foo_int integer not null , foo_timestamp timestamp(0) with time zone not null ) without o

[GENERAL] Suggestion for Date/Time Functions Section

2005-08-19 Thread CSN
Hi, I suggestion for the date/time functions in the docs: http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html I was trying to figure out how to do: update table set next=now() + interval 'table.period seconds'; I tried subqueries, the concat operator, and anything else I could

Re: [GENERAL] in transaction

2005-08-19 Thread Alvaro Herrera
On Fri, Aug 19, 2005 at 06:01:40PM -0700, elein wrote: > To replicate the situation in psql: > BEGIN; > select something; > > In another window I see that I have not only shared access locks > but an exclusive access lock. I do not understand why the exclusive > lock is there. Am I

Re: [GENERAL] Upgrade OS from Redhat AS3 (2.4 kernel) to AS4 (2.6)

2005-08-19 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Roger Hand wrote: >> I had assumed we would have to backup/restore the entire db, but I got >> to wondering if it would be possible to simply point the new Postgres >> install to the existing db (the data itself is on a separate drive >> array) and

Re: [GENERAL] Upgrade OS from Redhat AS3 (2.4 kernel) to AS4 (2.6)

2005-08-19 Thread Joshua D. Drake
Roger Hand wrote: Due to performance issues (which I wrote about on pg-performance list) we will be upgrading our Redhat AS3.0 box (kernel 2.4) to Redhat AS4 (kernel 2.6) in order to take advantage of the better I/O that the 2.6 kernel offers. (I say upgrading but actually we'll wipe the box a

Re: [GENERAL] in transaction

2005-08-19 Thread elein
On Fri, Aug 19, 2005 at 07:06:02PM -0400, Alvaro Herrera wrote: > On Fri, Aug 19, 2005 at 11:55:19AM -0700, elein wrote: > > I'm cross posting to INTERFACES. Please follow up > > on INTERFACES and not on general. Cross posting is evil. > > Well, I'm not on -interfaces, so I'll reply to both :-)

[GENERAL] Upgrade OS from Redhat AS3 (2.4 kernel) to AS4 (2.6) - Advice on keeping PG happy?

2005-08-19 Thread Roger Hand
Due to performance issues (which I wrote about on pg-performance list) we will be upgrading our Redhat AS3.0 box (kernel 2.4) to Redhat AS4 (kernel 2.6) in order to take advantage of the better I/O that the 2.6 kernel offers. (I say upgrading but actually we'll wipe the box and start fresh.)

Re: [GENERAL] in transaction

2005-08-19 Thread Alvaro Herrera
On Fri, Aug 19, 2005 at 11:55:19AM -0700, elein wrote: > I'm cross posting to INTERFACES. Please follow up > on INTERFACES and not on general. Cross posting is evil. Well, I'm not on -interfaces, so I'll reply to both :-) I don't worry too much about crossposting, because a) it's commonplace in

Re: [GENERAL] Installing soundex, metaphone, lenshtein

2005-08-19 Thread Carlos Oliva
Thank you Philip. I found everything and installed the functions successfully. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philip Hallstrom Sent: Friday, August 19, 2005 2:48 PM To: Carlos Oliva Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL]

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy

2005-08-19 Thread Jim C. Nasby
On Fri, Aug 19, 2005 at 08:03:39AM -0700, Stephan Szabo wrote: > On Fri, 19 Aug 2005, Bernard wrote: > > > But we can take this one step further so that we don't even need to > > trust ourselves: > > > > The logical next step is that for a non-postgresql-superuser user, > > COPY FROM files have to

Re: [GENERAL] Installing soundex, metaphone, lenshtein

2005-08-19 Thread Carlos Oliva
Thank you Phillip. I was able to install the functions with the command that you posted. I will look for the documents on the usage of these functions. -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 2:48 PM To: Carlos Oliva Cc: pgsql-ge

Re: [GENERAL] in transaction

2005-08-19 Thread elein
I'm cross posting to INTERFACES. Please follow up on INTERFACES and not on general. Cross posting is evil. --elein On Thu, Aug 18, 2005 at 05:02:18PM -0700, elein wrote: > I am also seeing this situation using hibernate. > > Some of the IDLE-in-transaction connections are sitting > there holdi

Re: [GENERAL] Installing soundex, metaphone, lenshtein

2005-08-19 Thread Philip Hallstrom
Where can I find instructions to install these functions in my 7.4 version? I am awaret hat they are in the contrib. folder but I have never installed functions from the contrib folder. Thanks in advance. From postgresql-7.4.2/contrib/README: Each subdirectory contains a README file with inf

[GENERAL] Installing soundex, metaphone, lenshtein

2005-08-19 Thread Carlos Oliva
Where can I find instructions to install these functions in my 7.4 version?  I am awaret hat they are in the contrib. folder but I have never installed functions from the contrib folder.  Thanks in advance. Carlos

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 6:20 pm, "Martijn van Oosterhout" wrote: > On Fri, Aug 19, 2005 at 06:10:28PM +0100, Adam Witney wrote: >>> If you get a pile of purely numeric output from bt, it's useless >>> (means you're running symbol-stripped executables). I'm hoping >>> for at least some function names. > > [t

Re: [GENERAL] libpq and unwanted stderr output

2005-08-19 Thread Martijn van Oosterhout
On Fri, Aug 19, 2005 at 10:16:14AM -0700, Steve Crawford wrote: > I have some C programs which use libpq and I do not want them to write > output to the screen (unless, of course, I direct them to do so). > When I use libpq I get unwanted messaged dumped to stderr. I think you want these: exter

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Martijn van Oosterhout
On Fri, Aug 19, 2005 at 06:10:28PM +0100, Adam Witney wrote: > > If you get a pile of purely numeric output from bt, it's useless > > (means you're running symbol-stripped executables). I'm hoping > > for at least some function names. [trace below] That's not stuck, somebody has typed COPY FROM

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > (gdb) bt > #0 0x40193812 in recv () from /lib/libc.so.6 > #1 0x081044d8 in secure_read () > #2 0x081084c7 in pq_recvbuf () > #3 0x0810853d in pq_getbyte () > #4 0x080cb12b in CopyGetData () > #5 0x080cb36e in CopyGetChar () > #6 0x080cd9d7 in CopyRea

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 6:08 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> On 19/8/05 5:27 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: >>> In theory that should always work. What PG version is this? Can you >>> attach to the stuck backend with gdb and get a stack trace?

[GENERAL] libpq and unwanted stderr output

2005-08-19 Thread Steve Crawford
I have some C programs which use libpq and I do not want them to write output to the screen (unless, of course, I direct them to do so). When I use libpq I get unwanted messaged dumped to stderr. Example (stripped of all error-checking, etc.): #include "/usr/include/pgsql/libpq-fe.h" int main

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > On 19/8/05 5:27 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: >> In theory that should always work. What PG version is this? Can you >> attach to the stuck backend with gdb and get a stack trace? > Am not particularly familiar with gdb, but if you tell me th

Re: [GENERAL] total db lockup

2005-08-19 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Ok, so it seems the lockup occured only with the hash indexes? Then it > means we still have bugs in the locking code for those. "Still" meaning "in the version he's using", which he hasn't told us anywhere that I saw. (Internal evidence suggests it's

Re: [GENERAL] question about plpgsql replace function

2005-08-19 Thread Michael Fuhr
On Fri, Aug 19, 2005 at 11:11:31AM -0500, Tony Caduto wrote: > I want to replace the CRLF with a comma so I can use the email > addresses in another app, so I thought I would do this: > > thearray = replace(mandi_notifications,'/r/n',','); > > but it does not work. Your slashes are leaning the

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > I have a query that appears to have hung somehow. I have tried sending a > SIGINT but this does not cancel it... What's the next step without taking > down the whole server? In theory that should always work. What PG version is this? Can you attach to th

Re: [GENERAL] total db lockup

2005-08-19 Thread Eugene
actually, I'm using postgresql 7.3.2. I noticed there were some hash index fixes in 7.4, so that might be it. Would there be any other reason for this deadlock? This database has been in production for almost 2 years and this is the first time we've seen the problem. thanks, Eugene > > From

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 5:27 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> I have a query that appears to have hung somehow. I have tried sending a >> SIGINT but this does not cancel it... What's the next step without taking >> down the whole server? > > In theory that

[GENERAL] Postgresql Function Language question

2005-08-19 Thread Tony Caduto
Is it possible to write c style functions with Free Pascal? Thanks, Tony ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Ah you want to return a record I suppose? > CREATE TABLE test (id int, name text); > INSERT INTO test VALUES(1, 'me'); > INSERT INTO test VALUES(2, 'you'); > CREATE FUNCTION test_func() RETURNS SETOF record AS ' > SELECT id, name FROM test; > ' LANG

Re: [GENERAL] question about plpgsql replace function

2005-08-19 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > I want to replace the CRLF with a comma so I can use the email > addresses in another app, so I thought I would do this: > thearray = replace(mandi_notifications,'/r/n',','); > but it does not work. I think you wanted backslashes not forward slashes.

Re: [GENERAL] plpython function with dictionary as function argument?

2005-08-19 Thread Peter Fein
[EMAIL PROTECTED] wrote: > Hi all. I need to know if it is possible to call a plpython stored funcion > with an dictionary as single argument: > > Suppose this python structure: > > someDict = { > 'field1': 'Foo', > 'creepyfield': 'Bar' > } > > The data base c

[GENERAL] question about plpgsql replace function

2005-08-19 Thread Tony Caduto
Hi, I have a text field that has some email addresses that are each on a new line by a CRLF. I want to replace the CRLF with a comma so I can use the email addresses in another app, so I thought I would do this: thearray = replace(mandi_notifications,'/r/n',','); but it does not work. Doe

Re: [GENERAL]

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 16:38:20 +0100 mailte Nigel Horne folgendes: > On Fri, 2005-08-19 at 16:30, Adam Witney wrote: > > > I can't work out from that how to return more than one value. > > > > Hi Nigel, > > > > Add SETOF to your function like so: > > > > CREATE TABLE test (id int); > > INSERT INTO

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Adam Witney
On 19/8/05 4:38 pm, "Nigel Horne" <[EMAIL PROTECTED]> wrote: > On Fri, 2005-08-19 at 16:30, Adam Witney wrote: >>> I can't work out from that how to return more than one value. >> >> Hi Nigel, >> >> Add SETOF to your function like so: >> >> CREATE TABLE test (id int); >> INSERT INTO test VALUES

Re: [GENERAL]

2005-08-19 Thread Nigel Horne
On Fri, 2005-08-19 at 16:30, Adam Witney wrote: > > I can't work out from that how to return more than one value. > > Hi Nigel, > > Add SETOF to your function like so: > > CREATE TABLE test (id int); > INSERT INTO test VALUES(1); > INSERT INTO test VALUES(2); > > CREATE FUNCTION test_func() RET

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Adam Witney
> I can't work out from that how to return more than one value. Hi Nigel, Add SETOF to your function like so: CREATE TABLE test (id int); INSERT INTO test VALUES(1); INSERT INTO test VALUES(2); CREATE FUNCTION test_func() RETURNS SETOF integer AS ' SELECT id FROM test; ' LANGUAGE SQL; SE

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 15:58:20 +0100 mailte Nigel Horne folgendes: > I can't work out from that how to return more than one value. 17:35 < rtfm_please> For information about srf 17:35 < rtfm_please> see http://techdocs.postgresql.org/guides/SetReturningFunctions 17:35 < rtfm_please> or http://www.p

Re: [GENERAL]

2005-08-19 Thread Nigel Horne
On Fri, 2005-08-19 at 16:30, Adam Witney wrote: > > I can't work out from that how to return more than one value. > > Hi Nigel, > > Add SETOF to your function like so: Hmm. Ta. Sorry for all the newbie questions, but SQL isn't something I know anything about, but any work's work at the moment!

Re: [GENERAL] Stored functions

2005-08-19 Thread Bruno Wolff III
On Fri, Aug 19, 2005 at 15:15:44 +0100, Nigel Horne <[EMAIL PROTECTED]> wrote: > Thanks for all the pointers. I'll have a look. I did reply > earlier, but the "reply to" is broken: it sent to the OP > rather than the list... No it isn't broken. You should use the reply to all function of your ma

[GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
Hi, I have a query that appears to have hung somehow. I have tried sending a SIGINT but this does not cancel it... What's the next step without taking down the whole server? Thanks Adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be c

Re: [GENERAL] total db lockup

2005-08-19 Thread Alvaro Herrera
On Fri, Aug 19, 2005 at 10:54:35AM -0400, Eugene wrote: > Thanks Alvaro. > > Here it is again: > > problem description:http://rafb.net/paste/results/bLAtIk26.html > db state before first restart: http://rafb.net/paste/results/D1Bqe125.html > db state before second restart: http://raf

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy

2005-08-19 Thread Stephan Szabo
On Fri, 19 Aug 2005, Bernard wrote: > But we can take this one step further so that we don't even need to > trust ourselves: > > The logical next step is that for a non-postgresql-superuser user, > COPY FROM files have to be world-readable and COPY TO files and > directories have to be world-writa

[GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Nigel Horne
I can't work out from that how to return more than one value. -Nigel ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] total db lockup

2005-08-19 Thread Eugene
Thanks Alvaro. Here it is again: problem description:http://rafb.net/paste/results/bLAtIk26.html db state before first restart: http://rafb.net/paste/results/D1Bqe125.html db state before second restart: http://rafb.net/paste/results/D1Bqe125.html table definition: http

[GENERAL] plpython function with dictionary as function argument?

2005-08-19 Thread gherzig
Hi all. I need to know if it is possible to call a plpython stored funcion with an dictionary as single argument: Suppose this python structure: someDict = { 'field1': 'Foo', 'creepyfield': 'Bar' } The data base connection CONN = pg.connect() I want some

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Tom Lane
Martijn van Oosterhout writes: > On Fri, Aug 19, 2005 at 09:15:52AM -0400, Stephen Frost wrote: >> Personally, I do like the idea of a user-level 'copy server-side files' >> permission that could be granted to reduce the need for things to run as >> superuser. > There is one important point thoug

Re: [GENERAL] Stored functions

2005-08-19 Thread Nigel Horne
Thanks for all the pointers. I'll have a look. I did reply earlier, but the "reply to" is broken: it sent to the OP rather than the list... Perhaps there is a lesson in newbie navigation for the website here. -Nigel ---(end of broadcast)--- TIP 1:

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Martijn van Oosterhout
On Fri, Aug 19, 2005 at 09:15:52AM -0400, Stephen Frost wrote: > Personally, I do like the idea of a user-level 'copy server-side files' > permission that could be granted to reduce the need for things to run as > superuser. There is one important point though: The server copying things is serio

Re: [GENERAL] Stored functions

2005-08-19 Thread Tom Lane
Nigel Horne <[EMAIL PROTECTED]> writes: > The on-line manual, > http://www.postgresql.org/docs/8.0/interactive/index.html, > doesn't describe how to call stored functions, or if it does > it's well hidden. Start here: http://www.postgresql.org/docs/8.0/static/xfunc.html http://www.postgresql.org/d

Re: [GENERAL] How disable context view in RAISE

2005-08-19 Thread Michael Fuhr
On Fri, Aug 19, 2005 at 10:10:41AM +0200, [EMAIL PROTECTED] wrote: > I have many noise messages with context view in plpgsl. > I have to trace my procedure but I can't disable context view after > "raise notice". How disable this feature ? What do you mean by "context view"? Are you referring to

Re: [GENERAL] threads and transaction ...sample code and stored procedure

2005-08-19 Thread Tom Lane
"Surabhi Ahuja " <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION insert_patient (varchar(65),varchar(65),date,var= > char(256)) RETURNS retval AS' > ... > LOCK TABLE patient in ACCESS EXCLUSIVE mode; > select patient_id into patId from patient where patient_key = patKey; > if not found > T

Re: [GENERAL] copy from ignores \,

2005-08-19 Thread Bruce Momjian
Read the COPY manual page --- backslashes are special and have to be doubled to be treated as literal. --- Bauhofer Mario wrote: > Hi, > > > > i tried to copy a german text file into a table "imp" using copy from. >

[GENERAL] copy from ignores \,

2005-08-19 Thread Bauhofer Mario
Hi,   i tried to copy a german text  file  into a table “imp” using copy from.     SET client_encoding TO LATIN1; -- german umlaute Copy imp from ‘filepath/filename.txt’ delimiter as ‘,’ Null as ‘\n’;   As you can see the “text” contains commas escaped by a backslash.   But cop

[GENERAL] How disable context view in RAISE

2005-08-19 Thread dknoto
Hi All, I have many noise messages with context view in plpgsl. I have to trace my procedure but I can't disable context view after "raise notice". How disable this feature ? Best regards -- Dariusz Knociński ---(end of broadcast)--- TIP 3: Have y

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Stephen Frost
* Stephan Szabo ([EMAIL PROTECTED]) wrote: > > On Fri, 19 Aug 2005, Bernard wrote: > > > My suggestions for improving the COPY command so it can be used by > > non-superuser users would be as follows: > > If you want to do this without switching to a different UNIX user, can't > you already writ

Re: [GENERAL] How to DES encrypt/decrypt strings from PL/pgSQL

2005-08-19 Thread Együd Csaba
Thank you very much. -- Csaba -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 1:34 PM To: Együd Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] How to DES encrypt/decrypt strings from PL/pgSQL Együd Csaba schrieb: > Hi, > I

Re: [GENERAL] Stored functions

2005-08-19 Thread Tino Wildenhain
Nigel Horne schrieb: The on-line manual, http://www.postgresql.org/docs/8.0/interactive/index.html, doesn't describe how to call stored functions, or if it does it's well hidden. Are there some examples anywhere? After googling I can find much duplication of non-data (people love to mirror sites

Re: [GENERAL] Stored functions

2005-08-19 Thread Martijn van Oosterhout
On Fri, Aug 19, 2005 at 12:07:57PM +0100, Nigel Horne wrote: > The on-line manual, > http://www.postgresql.org/docs/8.0/interactive/index.html, > doesn't describe how to call stored functions, or if it does > it's well hidden. > > Are there some examples anywhere? After > googling I can find much

Re: [GENERAL] Stored functions

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 12:07:57 +0100 mailte Nigel Horne folgendes: > The on-line manual, > http://www.postgresql.org/docs/8.0/interactive/index.html, > doesn't describe how to call stored functions, or if it does > it's well hidden. test=# create function get_foobar () returns varchar as $$begin retu

Re: [GENERAL] How to DES encrypt/decrypt strings from PL/pgSQL

2005-08-19 Thread Tino Wildenhain
Együd Csaba schrieb: Hi, I'd like to encrypt/decrypt a given string from a stored procedure. The encryption method is DES. Is there any way to do such? Some would say DES is more obfuscation rather then encryption .-) But I believe it is contained in the contrib/pgcrypto extension. (Depending

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy

2005-08-19 Thread Tino Wildenhain
Bernard schrieb: Andrew On Fri, 19 Aug 2005 04:17:16 -, you wrote: In the majority of bulk load cases, the input exists as a file already But not necessarily on the server. True. But I am concerned with the server, and there I want that things are handled on the server, not on the cl

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Oliver Jowett
Bernard wrote: Certainly supporting COPY via STDIN within the java code seems preferable. Why do you say that? That option does not exist because the Postgresql JDBC driver does not support it. If you raise this on pgsql-jdbc (so far, I haven't seen anything on that list from you at all..)

[GENERAL] Stored functions

2005-08-19 Thread Nigel Horne
The on-line manual, http://www.postgresql.org/docs/8.0/interactive/index.html, doesn't describe how to call stored functions, or if it does it's well hidden. Are there some examples anywhere? After googling I can find much duplication of non-data (people love to mirror sites don't they?) but no re

[GENERAL] How to DES encrypt/decrypt strings from PL/pgSQL

2005-08-19 Thread Együd Csaba
Hi, I'd like to encrypt/decrypt a given string from a stored procedure. The encryption method is DES. Is there any way to do such? Thank you, Csaba -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 2005.08.18.

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy

2005-08-19 Thread Oliver Jowett
Greg Stark wrote: Oliver Jowett <[EMAIL PROTECTED]> writes: Bernard was also objecting to the overhead of pushing the data down a TCP pipe when it's already available locally, I think.. I didn't find any real difference there when I compared the two methods, though. What makes you think it'

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Bernard
Sean, Very diplomatic way to get the message across without offending anyone except the bastards. Capatalism is good for development. But it has to be kept in check as to not destroy the basis on which it once grew and provided fair chances for anyone to participate. Who is keeping it in check to

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Bernard
Sean, Thanks for the psql suggestion. Certainly this is a possible robust solution. The disadvantage could be that you need a new process for each table. Or can you launch psql with multiple commands? I am not looking for convenience mainly. I am interested in execution speed, maintainability and

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a file

2005-08-19 Thread Sean Utt
cc'ing the list, haven't seen it show up there And yeah, I'm using Outlook Express and the quoting is crappy. So sue me I never saw your request rejected, though it did rank low on priority -- in my book at least. The problem has been discussed at length, and there are multiple ways to

[GENERAL] threads and transaction ...sample code and stored procedure

2005-08-19 Thread Surabhi Ahuja
 Hello all,this is in regards to a problem that i am facing ..in case of executing transaction in a multi threaded environment.please take some time out to study it and help me.The programs is as follows:(see attachment)the output on running it as follows:( i have marked the output ..in red ..at

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a file

2005-08-19 Thread Martijn van Oosterhout
On Fri, Aug 19, 2005 at 05:49:06PM +1200, Bernard wrote: > If the owner of an application owning the connections trusts the > application and gets the postgres superuser to grant it the right to > read from files, then it is obviously acceptable to the owner of the > application and to the postgres

Re: [GENERAL] Timing out connections?

2005-08-19 Thread Len Walter
I used pgpool for a similar problem. It has an option for timing out idle connections. Len On 8/19/05, Peter Fein <[EMAIL PROTECTED]> wrote: > Hi- > > Is there any way to have the *server* timeout disconnected clients? I'm > connecting over a sometimes flaky WiFi connection & when it goes down,

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Sean Utt
Yeah, I'm -vvv tonight. psql provides \COPY table from file how about String cmd = "psql -c '\COPY table from file' -U user -d database" Process p = Runtime.getRuntime( ).exec( cmd ); yatta yatta yatta, blah blah blah naturally, if the database/server doesn't trust you, you'll have to jump som

Re: [GENERAL] Input timestamp from epoch?

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 0:27:40 -0700 mailte Bill Moseley folgendes: > I'm entering data into a Postgresql database where the input dates are > currently in unix epoch values. Is there a way for Postgresql to > parse that epoch into a "timestamp(0) with time zone"? SELECT TIMESTAMP WITH TIME ZONE 'ep

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a file

2005-08-19 Thread Sean Utt
This is silly. The bug being reported is that a non-super-user can't copy from a server side file with JDBC. There are a jillion (no, really, a jillion) other ways to accomplish this, because as is the Perl motto, there is more than one way to do it. If this is really so important, Bernard

[GENERAL] Input timestamp from epoch?

2005-08-19 Thread Bill Moseley
I'm entering data into a Postgresql database where the input dates are currently in unix epoch values. Is there a way for Postgresql to parse that epoch into a "timestamp(0) with time zone"? I read section 8.5 "Date/Time Types" and I can see I can input an (well THE) epoch, and I can EXTRACT(EPOC

Re: [GENERAL] [BUGS] BUG #1830: Non-super-user must be able to copy from a

2005-08-19 Thread Bernard
Greg, The desired COPY FILE functionality for a local non-superuser user would require a local file. That file is available locally. A suggested workaround COPY with STDIN would involve the TCP pipe. This does of course have the support for remote uploads. But I am not currently interested in re