On Wednesday 20 December 2006 7:36 pm, [EMAIL PROTECTED] wrote:
> I am trying to loop through some data and then run insert some of the
> resulting data into a new table. I can create the function but when I run
> it i get the error:
>
> ERROR: query "SELECT 'INSERT INTO payment (
> id,amount,acc
Hello Archie,
We approach the problem slightly differently then others. Given an aggregate
function comma_list which simply creates a comma seperated list, we use
distinct to remove duplicates.
test=# select comma_list(col) from test;
comma_list
a, b, a, c
(1 row)
test=# select
On 2006-10-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a small coding problem where my function is becoming, well, too
> ugly for comfort. I haven't finished it but you will get picture below.
>
> First a small description of the purpose. I have an aggregate function
> t
Well, first off, this would be much easier in one of the other pl's such
as for perl or ruby. Using plpgsql, I would suggest using more of the
string function split_part since you know the delimiters the string can
split on, using str_pos just to verify that there is say a '/' in a part
of the
On Mon, 2006-09-11 at 10:05, Enrico Riedel wrote:
> Hi!
>
> I moved all of our PostGRE DBs from Windows to Linux last weekend.
> Everything went well, performance is great, BUT there is one issue that I
> need to solve.
>
> My problem is, that the precision for timestamps in Linux is greater than
On Mon, 11 Sep 2006 10:05:14 -0500
Enrico Riedel <[EMAIL PROTECTED]> wrote:
> My problem is, that the precision for timestamps in Linux is
> greater than in Windows. That seems to be fine, but MS Access
> cannot handle it. E.g.:
>
>Windows Timestamp: 2006-09-08 15:25:42.332
>Linux Timesta
On Fri, Jul 07, 2006 at 03:48:00PM +0200, Marc Haber wrote:
> I am the maintainer of Debian's packages for exim4, a powerful and
> versatile Mail Transfer Agent developed in Cambridge and in wide use
> throughout the Free Software Community (http://www.exim.org/).
>
> One of our daemon flavours ha
[ Coming late to the thread... ]
Steve Atkins <[EMAIL PROTECTED]> writes:
> Fortunately all this stuff is MUA-side, not MTA-side, so exim
> should ignore it. SQL_ASCII all the way.
I concur. The recent encoding fixes are for the situation where the
database server believes a multibyte encoding i
On Jul 11, 2006, at 6:29 PM, Bruno Wolff III wrote:
SQL_ASCII may also be an option (assign no special meaning to
characters at all), but I'm less sure of that. Can email address
contain multibyte characters? I didn't think so...
E-Mail addreses themselves can't, but the "comment" field of an
> > SQL_ASCII may also be an option (assign no special meaning to
> > characters at all), but I'm less sure of that. Can email address
> > contain multibyte characters? I didn't think so...
>
> E-Mail addreses themselves can't, but the "comment" field of an
> address can.
The comment field itself
Marc Haber wrote:
> Please note that exim is so flexible that it is possible to implement
> mail spool storage in an SQL database. In this case, we'd write data
> which originated in an untrusted source to the database, not knowing
> about encoding at all.
If you are going to store things in mult
On Sun, Jul 09, 2006 at 06:16:48PM +0200, Marc Haber wrote:
> > I'd suggest adding a PQsetClientEncoding(conn, "Latin1") right after
> > you establish a connection. I'm not sure if Exim has any kind of
> > declaration about what encoding strings have internally.
>
> No, it does not.
That's your f
* Martijn van Oosterhout:
> * If application always sends untrusted strings as out-of-line
> parameters, instead of embedding them into SQL commands, it is not
> vulnerable.
This paragraph should explictly mention PQexecParams (which everybody
should use anyway).
It seems that Exim's archite
Hi,
On Fri, Jul 07, 2006 at 05:15:11PM +0200, Martijn van Oosterhout wrote:
> On Fri, Jul 07, 2006 at 03:48:00PM +0200, Marc Haber wrote:
> > From what I understand, the correct way would be to use
> > PQescapeStringConn, but that function needs an established connection,
> > and exim performs str
On Fri, Jul 07, 2006 at 04:53:14PM +0200, Martijn van Oosterhout wrote:
> On Fri, Jul 07, 2006 at 03:48:00PM +0200, Marc Haber wrote:
> > I am the maintainer of Debian's packages for exim4, a powerful and
> > versatile Mail Transfer Agent developed in Cambridge and in wide use
> > throughout the Fr
On Fri, Jul 07, 2006 at 03:48:00PM +0200, Marc Haber wrote:
> From what I understand, the correct way would be to use
> PQescapeStringConn, but that function needs an established connection,
> and exim performs string escape "early", way before the actual
> connection is established.
I just downlo
On Fri, Jul 07, 2006 at 03:48:00PM +0200, Marc Haber wrote:
> Hi,
>
> I am the maintainer of Debian's packages for exim4, a powerful and
> versatile Mail Transfer Agent developed in Cambridge and in wide use
> throughout the Free Software Community (http://www.exim.org/).
>
> One of our daemon fl
Haroon Sayyad wrote:
Dear Sir, Please help us and guide us to solve following error while
using postgres 8.3 version. Error showing is
'invalid page header in block 102 of relation pg_proc'
There is no PostgreSQL version 8.3 - please check again.
The error message suggests on-disk corruption.
Jenny wrote:
I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been
dealing with Psql for over than 2 years now, but I've never had this case
before.
Then I try to run the query from the psql shell. For example, the table has
obat_id : A, B, C, D.
db=# UPDATE s_apotik SET
Jenny schrieb:
I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been
dealing with Psql for over than 2 years now, but I've never had this case
before.
I have a table that has about 20 rows in it.
Table "public.s_apotik"
Column | Type
On Mon, 28 Nov 2005 10:32:53 +, Richard Huxton wrote:
> Haim Ashkenazi wrote:
>> Hi
>>
>> I'm writing an application that calculates working hours for billing.
>> there are three levels of billing. one for regular hours, one for
>> evening/nights, and one for saturdays/holidays.
>>
>> My fi
Haim Ashkenazi wrote:
Hi
I'm writing an application that calculates working hours for billing.
there are three levels of billing. one for regular hours, one for
evening/nights, and one for saturdays/holidays.
My first decision is wether I make these calculations in a database view
(If I under
"Troy" <[EMAIL PROTECTED]> writes:
> P.S. - Tom if the return of func2 = var_X = (10,5) how can I parse the
> varible out like:
> var_Y = var_X[1] -- first ARRAY item
> to get var_Y = 10?
Try assigning the function result to a RECORD variable, perhaps
SELECT * INTO rec FROM foo(...);
The
Tom's right, As in the first message of this thread kindof shows;
func2(INOUT) adds the var_1 to itself and ouputs back to func1 as the
updated value.
NOTICE: var_1 starts as 5
NOTICE: var_1 in func2 is 10
CONTEXT: PL/pgSQL function "func1" line 7 at assignment
NOTICE: var_X Now is (10,
> Probably not, if the way you seem to expect it to work is like Oracle.
> An INOUT parameter isn't some sort of modifiable by-reference variable,
> it's just a shorthand for declaring an IN parameter and an OUT
> parameter.
>
Thanks for the response.
That makes a lot of sense but I guess I was w
Tony Caduto <[EMAIL PROTECTED]> writes:
> So what you are saying is INOUT params are NOT constants and you can
> modify them in the function body?
If you couldn't modify them, there would be no way to return a new
value (ie, anything but the passed-in value), so it'd be pretty broken
IMHO ...
Tom Lane wrote:
Tony Caduto <[EMAIL PROTECTED]> writes:
I have noticed this as well, if I declare OUT params I can modify them
to my hearts content before they go out,
however if you declare it as a INOUT you can't modify it because it is
declared as a constant.
Uh, I don't think so.
Tony Caduto <[EMAIL PROTECTED]> writes:
> I have noticed this as well, if I declare OUT params I can modify them
> to my hearts content before they go out,
> however if you declare it as a INOUT you can't modify it because it is
> declared as a constant.
Uh, I don't think so.
Tom Lane wrote:
"Troy" <[EMAIL PROTECTED]> writes:
Does PL/PGSQL handle
INOUTS the same as ORACLE PL/SQL?
Probably not, if the way you seem to expect it to work is like Oracle.
An INOUT parameter isn't some sort of modifiable by-reference variable,
it's just a shorthand for declaring
"Troy" <[EMAIL PROTECTED]> writes:
> Does PL/PGSQL handle
> INOUTS the same as ORACLE PL/SQL?
Probably not, if the way you seem to expect it to work is like Oracle.
An INOUT parameter isn't some sort of modifiable by-reference variable,
it's just a shorthand for declaring an IN parameter and an OU
thank you all for your help.
this solved it:
SELECT count(*) FROM table where date_part('hour', time_stamp) in (10, 11);
Scott Marlowe wrote:
On Wed, 2005-06-29 at 13:20, Jeffrey Melloy wrote:
D A GERM wrote:
I have been trying to write an sql statement that returns the same
hours
On Wed, 2005-06-29 at 13:20, Jeffrey Melloy wrote:
> D A GERM wrote:
>
> > I have been trying to write an sql statement that returns the same
> > hours in a time stamp no matter what the date.
> > I can to pull same hours on the the same days but have not been able
> > to figure out how to pull
D A GERM wrote:
I have been trying to write an sql statement that returns the same
hours in a time stamp no matter what the date.
I can to pull same hours on the the same days but have not been able
to figure out how to pull all the same hours no matter what the date.
Here is the one sql stat
On Wed, Jan 19, 2005 at 07:39:29AM -0700, Michael Garriss wrote:
> We had a significant production outage with a box running 8.0 Beta 4,
> 140GB data, 190GB index. We think it was a bad RAID controller card.
> Our transaction logs are gone but we have raw data.
>
> How can we recover this data
On Fri, 2005-01-07 at 13:03 -0500, John Doggett wrote:
> When I did that, I now get a different error, that the postmaster is
> refusingthe connection. The solution to this problem is supposed to be
> adding tcpip_socket = true to the postgresql.conf file and restarting the
> postgresql ser
]
[mailto:[EMAIL PROTECTED] Behalf Of Alex Turner
Sent: Friday, January 07, 2005 12:04 PM
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] need help Connect failure in an applet
An applet is only permitted to connect back to the originating server
IP that served the HTTP
An applet is only permitted to connect back to the originating server
IP that served the HTTP request. If you try to connect to a different
address, it will fail with a permissions exception. 127.0.0.1 is the
localhost loopback address, and would not work from a remote host
either.
Alex Turner
N
On Tue, Dec 21, 2004 at 17:50:06 -0500,
"Frank D. Engel, Jr." <[EMAIL PROTECTED]> wrote:
>
> Also, given the amount of data you are talking about, and assuming that
> you are inserting all of this data in one big lump, you may wish to
> VACUUM FULL after doing your INSERTs (not after each one,
On Wed, Dec 22, 2004 at 01:24:57 +,
"Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> Yes, of course, this is example only.
> But relation between tables is not important now...
It is important for design. You should use a normallized design initially
and consider denormalized designs if y
I absolutly agree with you, thank.
On Tuesday 21 December 2004 22:50, you wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Why would it be?
>
> The only real advantage to what you are suggesting would be slightly
> reduced disk space usage, and just maybe *very* slightly improved
> per
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Why would it be?
The only real advantage to what you are suggesting would be slightly
reduced disk space usage, and just maybe *very* slightly improved
performance on low-memory servers, or servers with very slow disks, but
I find it unlikely that th
On Tuesday 21 December 2004 22:00, Bruno Wolff III wrote:
> On Wed, Dec 22, 2004 at 00:16:06 +,
>
> "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> > On Tuesday 21 December 2004 21:21, Bruno Wolff III wrote:
> > > On Tue, Dec 21, 2004 at 20:47:31 +,
> > >
> > > "Vladimir S. Petukhov
On Wed, Dec 22, 2004 at 00:16:06 +,
"Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> On Tuesday 21 December 2004 21:21, Bruno Wolff III wrote:
> > On Tue, Dec 21, 2004 at 20:47:31 +,
> >
> > "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> > > Ok, this is a real example:
> > >
> >
On Tuesday 21 December 2004 21:21, Bruno Wolff III wrote:
> On Tue, Dec 21, 2004 at 20:47:31 +,
>
> "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> > Ok, this is a real example:
> >
> > CREATE TABLE account (
> > val1 BIGINT NULL,
> > val2BIGINT NULL,
> > ...
> >
>
On Tue, Dec 21, 2004 at 20:47:31 +,
"Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> Ok, this is a real example:
>
> CREATE TABLE account (
> val1 BIGINT NULL,
> val2BIGINT NULL,
> ...
>
> dayposSMALLINTNULL, -- Day position
> hourpos SMALLINTNU
Instead of having separate fields for day, hour, ... - why not use
timestamp values?
On Dec 21, 2004, at 3:47 PM, Vladimir S. Petukhov wrote:
Ok, this is a real example:
CREATE TABLE account (
val1 BIGINT NULL,
val2BIGINT NULL,
...
dayposSMALLINTNULL, -- Day pos
Ok, this is a real example:
CREATE TABLE account (
val1 BIGINT NULL,
val2BIGINT NULL,
...
dayposSMALLINTNULL, -- Day position
hourpos SMALLINTNULL, -- Hour position
idINT NULL -- Link to the object
);
On Tuesday 21 December 2004 1
On Mon, Dec 20, 2004 at 12:13:31 +,
"Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote:
> Hi
> Sorry for my English..
>
> I need to organize database structure for saving statistic data for objects.
> I
> have about 24 * 31 * 4 fields (4 month, 31 days, 24 hours) of data for one
> object.
Artistic-HO- IT-Department wrote:
Hi
I have a user table in which number of users are created in a
database rather creating postgresql user. We are having only one
database user, through which we connect database.
OK
Like Mr. A add intry into table and data is copied into audit table.
Mr. B edit e
On Thu, Aug 19, 2004 at 16:47:55 +0800,
Robert Ngo <[EMAIL PROTECTED]> wrote:
> copy swpparm from stdin using delimiters ';';
>
> exampaper;02;1;Bahasa Melayu;M;A;2002-11-27;system;;
>
> \.
>
> why does the above command return a error message
It looks like the column that is associated with
Kevin Matthews wrote:
subscribe end
i am getting this error
org.apache.jasper.JasperException: ERROR: current transaction is
aborted, queries ignored until end of transaction block
It appears an error has occurred in your current transaction, which has
caused it to abort. Until you issue a ROLLBA
On Wed, 18 Feb 2004, Froggy / Froggy Corp. wrote:
> The problem is that on "fire time", the load go to > 1 and stay long
> time. But with top (i use top -d 1 to have "real" load average) i can
> see that the CPU is more than 50% idling.
>
> For exemple, i have this kind of stat :
>
> 0s -
Hi Meena,
you'll find the answers to your question in the postgres doc's. I'd suggest
reading at least the Tutorial
(http://www.postgresql.org/idocs/index.php?tutorial.html). Some basic
concepts (postmaster, clients, architecture of postgres) are explained
there.
Answers to your questions about t
> Once we start a Postmaster process, will it keep
running forever?
It will if you run it in background like
postmaste -i -D /home/mydir/pgsql-database-dir &
> How can we restart/stop??(the commands???)
The preferred command might be pg_ctl that comes
along with postgresql distribution:
pg_c
--- Hiroshi Inoue <[EMAIL PROTECTED]> wrote:
> Allan Rafuse wrote:
> >
> > I'm having trouble setting up a remote Apache PHP webserver
> to connect to
> > our postgres machine using ODBC.
> >
>
> Are you using ~/.odbc.ini(user DSN) for odbc.ini ?
> Current psqlodbc driver doesn't understand sys
Vilson farias wrote:
> I've been changing some tables and I saw a strange behavior in pg_trigger.
> Check out the commented code below :
>
> [...]
>
> Now, if I select the corresponding triggers from pg_trigger, I'll find
> three. Why 3? One for update, one for insert and one for delete ?
One
Steven Saner <[EMAIL PROTECTED]> writes:
> I will probably restart the postmaster tonight and make sure that
> logging is being done. Then if it happens again we might have more to
> go on.
If you're going to do that, please install 7.0.2 first, else the log
likely won't tell us much anyway ...
On Wed, Jul 05, 2000 at 04:29:16PM -0400, Tom Lane wrote:
> Steven Saner <[EMAIL PROTECTED]> writes:
> > Using Postgres 7.0 on BSDI 4.1
> > For the last several days we are getting errors that look like this:
>
> > Error: cannot write block 0 of krftmp4 [adm] blind.
>
> > An interesting thing is
"Philip Poles" <[EMAIL PROTECTED]> writes:
> I'm not sure if this is relevant, but I've seen similar errors occur
> when there are too many open files on the filesystem (running Linux RH
> 6.2). I'm not sure if this problem is in the backend or the Linux
> kernal, or somewhere else, not being ver
ad on the server...I'll keep trying, maybe I can get a bug report in
about it after all.
- Original Message -
From: Tom Lane <[EMAIL PROTECTED]>
To: Steven Saner <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 05, 2000 4:29 PM
Subject: Re: [GENERAL] Need
Steven Saner <[EMAIL PROTECTED]> writes:
> Using Postgres 7.0 on BSDI 4.1
> For the last several days we are getting errors that look like this:
> Error: cannot write block 0 of krftmp4 [adm] blind.
> An interesting thing is that in this example, krftmp4 is a table that
> the user that got this
gpsdistance(34.2865, 118.435, latitude, longitude) <= 10.0
Phil Culberson
DAT Services
-Original Message-
From: Ed Loehr [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 02, 2000 1:21 PM
To: Scott Holmes
Cc: pgsql-general
Subject: Re: [GENERAL] Need help with attributes...
Scott Holmes wrote
create function money(float8) returns money as '
declare
f2 float8;
m money;
i2 int2;
i1 int4;
txt text;
begin
if $1 isnull then
return NULL;
end if;
--integer part...
i1:= dtrunc($1);
-- decimal part..
On Fri, 2 Apr 1999, Jun Zhang wrote:
> I got postgresql-6.4.2, tried to compile under AT&T System 3000 (ncr).
> I think it is very reasonable to group my platform to svr4, which is the
> template I used. Configure is fine.
>
> Gnu make 3.77 was used. the "make all" did fine untile it entered the
Well, I once split up a bunch of multiline addresses with lines like
this:
select "PerIndex",substr("addr",1,(strpos("addr",'\n')- 1)) as addr,
substr("addr",(str
pos("addr",'\n')+1)) as addr2 into tmp2_addr from tmp_addr;
so, try something like (untested):
select substr(username_password,1,(s
301 - 365 of 365 matches
Mail list logo