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
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
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
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
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
"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
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
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 :-)
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.)
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
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]
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
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
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
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
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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.
[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
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
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
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
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
> 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
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
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!
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
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
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
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
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
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
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
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
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:
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
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
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
"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
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.
>
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
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
* 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
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
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
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
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
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
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
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..)
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
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.
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'
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
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
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
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
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
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,
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
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
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
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
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
77 matches
Mail list logo