On Sun, 2009-08-16 at 21:10 +0100, Andre Lopes wrote:
> I need a plpgsql function to validade e-mail addresses. I have google
> but I can't find any.
>
> My question: Anyone have a function to validate e-mails?
I recommend something based on the following recipe in PL/Perl.
http://wiki.postgres
Kalai R wrote:
> i am near to PostgreSql. I create a database by the
> superuser. Then i create another logon user. Now how can i
> protect my database from the new user. i want to ban the
> access and view the database to the new user.It can done by
> an entry in pg_hba file. Is there any oth
I've never received any reply to this post; as I said, I think I have a dump
that recreates the problem.
--- Ven 14/8/09, Scara Maccai ha scritto:
> Da: Scara Maccai
> Oggetto: Re: [GENERAL] totally different plan when using partitions
> A: "Tom Lane"
> Cc: "pgsql-general"
> Data: Venerdì 1
Hello,
Can I ask you guys for suggestion on my replication
requirements? I'm new to postgresql and the replication itself, so your
inputs will be highly appreciated.
My Situation:
I have deployed a POS unit in our remote store using Openbravo POS
as the software with a local installation of Post
2009/8/17 David Fetter :
> On Mon, Aug 17, 2009 at 07:50:14AM +0200, Pavel Stehule wrote:
>> 2009/8/17 David Fetter :
>> > On Mon, Aug 17, 2009 at 06:43:54AM +0200, Pavel Stehule wrote:
>> >> Hello
>> >>
>> >> 2009/8/16 Andre Lopes :
>> >> > Hi,
>> >> >
>> >> > I need a plpgsql function to validade
On Mon, Aug 17, 2009 at 2:29 AM, Jorge Daine
Quiambao wrote:
> Hello,
>
> Can I ask you guys for suggestion on my replication requirements? I'm new to
> postgresql and the replication itself, so your inputs will be highly
> appreciated.
>
> My Situation:
>
> I have deployed a POS unit in our remote
I have the same problem with this guy.
http://archives.postgresql.org/pgsql-admin/2003-12/msg00205.php
>>I have a postgresql server process each running in my
>>desktop and the laptop.
>>Both servers have a database called MG with exactly
>>same scheme/layout. Now I enter the data in to similar
Thanks Scott for your timely response.
Slon-I introduction says it probably won't work out
well in
Sites where connectivity is really "flakey" Replication to nodes that are
unpredictably connected. Replicating a pricing database from a central server
to sales
staff who connect periodically to g
Hi all,
A few thousand rows have been deleted by accident in one of our databases.
I immediately disabled autovacuum and recovered the missing rows using pgfsck,
a PostgreSQL table checker and dumper.
pgfsck can be found here:
http://svana.org/kleptog/pgsql/pgfsck.html
I am now fa
I've several list of items that have to be rendered on a web apps in
the same way.
The structure is:
create table items (
itemid int primary key,
/* some fields */
);
create table headert1 (
ht1 int primary key,
/* several other fields that varies in nature */
);
create table itemlistt1
Thom Brown wrote:
> This would preferrably not resort to trying to generate the ID, then
> checking for a clash, and if there is one, do it again, although that could
> do as I can't think of how the ideal solution of a ID hashing algorithm
> would be possible.
As suggested upthread, this
Hello
I am not sure, if it's possible for you. PostgreSQL 8.4 has EXECUTE
USING clause, it is 100% safe.
Pavel
2009/8/17 Ivan Sergio Borgonovo :
> I've several list of items that have to be rendered on a web apps in
> the same way.
>
> The structure is:
>
> create table items (
> itemid int pri
On 2009-08-17, Sam Mason wrote:
> On Sun, Aug 16, 2009 at 04:53:01PM -0600, Bob Gobeille wrote:
>> One way is to use a LFSR (linear feedback shift register function). I
>> haven't used one in a long time but I recall generating pseudo random
>> numbers that are guaranteed not to repeat after
Dear Richard,
I can't exclude the table because it is important table.
Is there any way , i could get the data back.
Utsav
Richard Huxton wrote:
>
> utsav.turray wrote:
>> Dear All,
>>
>> I am using postgres 7.3 version on RHEL 4.0.
>> My database has been restored.
>> All tables all workin
On Mon, Aug 17, 2009 at 12:17:29PM +, Jasen Betts wrote:
> On 2009-08-17, Sam Mason wrote:
> (i.e. their internal state is the same as
> > it was before) but individual numbers *will* be repeated.
>
> numbers will not be repeated intil the state wraps if the number
> returned represents the e
Greg Stark wrote:
> Why is this thread still going on?
Sorry, it's still going on. Call me a slow learner if you want :)
> What does the spec say we should be
> doing and are we violating it in any of these cases?
After a bit more reading, I believe the bottom line is:
while the spec s
Sam Mason wrote:
> > CREATE FUNCTION test() returns void as $$
> > declare
> > r our_table;
> > begin
> > r:=null;
> > end;
> > $$ LANGUAGE plpgsql;
> >
> > SELECT test() yields:
> > ERROR:cannot assign non-composite value to a row variable
> > CONTEXT: PL/pgSQL function "test"
In article <20090816122526.gw5...@samason.me.uk>,
Sam Mason writes:
> I've just had a look and PG does actually seem to be returning values as
> I'd expect, i.e. 0 <= n < 1.
That's what everyone would expect. If it's really implemented like
that the documentation is wrong, isn't it?
--
Sent
On Sunday 16 August 2009 5:13:51 pm Nuno Mota wrote:
> Hi,
>
> I am kind of new into python, and I have been trying to port some plperl
> functions into plpython, but I've run up into a problem.
>
> Imagine the following plpython code.
>
> CREATE OR REPLACE FUNCTION greet (how text)
> RETURNS SET
On Mon, Aug 17, 2009 at 03:45:02PM +0200, Daniel Verite wrote:
> while the spec says that if X is the null value, then "X is null"
> evaluates to true, it doesn't say that if "X is null" is true, then X
> is the null value. And that's the catch.
But you've had to introduce a whole new abstraction
On Mon, Aug 17, 2009 at 04:00:54PM +0200, Harald Fuchs wrote:
> In article <20090816122526.gw5...@samason.me.uk>,
> Sam Mason writes:
>
> > I've just had a look and PG does actually seem to be returning values as
> > I'd expect, i.e. 0 <= n < 1.
>
> That's what everyone would expect. If it's re
We had a hardware failure last week and had to switch over to our spare.
Unfortunately, at some point we managed to get some data corruption. I've
been going through the database table by table, record by record, trying to
find the problems and fix them.
This one has me stumped. We have one tab
On Mon, Aug 17, 2009 at 12:36:49PM +0200, Ivan Sergio Borgonovo wrote:
> I've several list of items that have to be rendered on a web apps in
> the same way.
[..]
> the nature of the lists and their usage pattern is very different.
> So unless someone come up with a better design I still would like
I am looking for pgbench. Is there a good source from which I can download the
most current version?
your help is appeciated,
Chris
_
Stay on top of things, check email from other accounts!
http://go.microsoft.com/?linkid=96
Andrew Bartley escribió:
> PS on this note, how do we log PIDS? This is another "need to have" for our
> production systems. We log user activity and trace DB activity through the
> PIDS.
See log_line_prefix. You can use something like '%p ' (note the space
at the end), or stuff like the sessi
On Mon, Aug 17, 2009 at 4:23 PM, Bryan Murphy wrote:
> I've identified 82 bad records. When I try to query for the records,
> we get the following:
> ERROR: missing chunk number 0 for toast value 25692661 in pg_toast_25497233
> That's fine. I've run into that in a few other tables and have just
David De Maeyer wrote:
> I am now facing a puzzling challenge: converting binary timestamp
> data! If pgfsck did properly recover the timestamp data as a binary
> string, pgfsck will use a default timestamp, "1900-01-01 00:00:00",
> presumably because the date/time encoding varies from platform to
utsav.turray wrote:
>
> Dear Richard,
>
> I can't exclude the table because it is important table.
> Is there any way , i could get the data back.
Dump it and restore the dump.
--
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Promp
On Mon, Aug 17, 2009 at 11:35 AM, Greg Stark wrote:
> On Mon, Aug 17, 2009 at 4:23 PM, Bryan Murphy
> wrote:
> > I've identified 82 bad records. When I try to query for the records,
> > we get the following:
> > ERROR: missing chunk number 0 for toast value 25692661 in
> pg_toast_25497233
> >
Hi Guys,
In relation to pg_autovacuum, I have a quick question, that I can't seem
to find an answer to anywhere. I use a temporary database that only
exists when certain scripts are running, and is dropped when the scripts
are complete. In that process, I have seen pg_autovacuum periodically
exami
Could I run pg_resetxlog on a warm spare? Would that give the same result?
Unfortunately, this is our production system and I simply cannot bring it
down at the moment to run pg_resetxlog.
Bryan
On Mon, Aug 17, 2009 at 11:35 AM, Greg Stark wrote:
> On Mon, Aug 17, 2009 at 4:23 PM, Bryan Murphy
Chris Bowlby wrote:
> Hi Guys,
>
> In relation to pg_autovacuum, I have a quick question, that I can't seem
> to find an answer to anywhere. I use a temporary database that only
> exists when certain scripts are running, and is dropped when the scripts
> are complete. In that process, I have seen
Bryan Murphy writes:
> Here's the xmin/xmax/ctid for three problematic records:
> prodpublic=# select xmin,xmax,ctid from items_extended where id in
> ('34537ed90d7546d78f2c172fc8eed687', '3e1d99b7124742b7aaf2f869f7637b0e',
> '499b464f141a48619c5ce0475cbe9150');
>xmin| xmax|ctid
On Mon, Aug 17, 2009 at 12:17 PM, Tom Lane wrote:
> Bryan Murphy writes:
> > Here's the xmin/xmax/ctid for three problematic records:
>
> > prodpublic=# select xmin,xmax,ctid from items_extended where id in
> > ('34537ed90d7546d78f2c172fc8eed687', '3e1d99b7124742b7aaf2f869f7637b0e',
> > '499b464
Hi Alvaro,
Thanks for the response. I've run into situations where the database
has also been removed just before pg_autovacuum was about to check, and
there by kicks out an error (mainly an aesthetic issue, not really a
functional issue). If an option was added to PostgreSQL itself to
support th
I use PSQL to set my editor to vi. This works as expected in psql, \e
brings up vi and I edit away.
Is there any way to set my psql command line editor to also use vi
(just like I do with "set -o vi" in bash)?
I can't find this in the docs.
Thanks,
Bob Gobeille
b...@fossology.org
--
Sent
Bryan Murphy writes:
> On Mon, Aug 17, 2009 at 12:17 PM, Tom Lane wrote:
>> Hm, what's your current XID counter? (pg_controldata would give an
>> approximate answer.) I'm wondering if the xmax's are marked committed
>> but are in the future ...
> Latest checkpoint's NextXID: 0/3088298
Thank you very much,
Can i ask one more question ?
How do I declare the correct result set to return, this in first example
code, is it possible ?
Thank you again,
Nuno Mota
On Mon, Aug 17, 2009 at 3:21 PM, Adrian Klaver wrote:
> On Sunday 16 August 2009 5:13:51 pm Nuno Mota wrote:
> > Hi,
>
Chris Bowlby writes:
> Thanks for the response. I've run into situations where the database
> has also been removed just before pg_autovacuum was about to check, and
> there by kicks out an error (mainly an aesthetic issue, not really a
> functional issue).
That was fixed some time ago. It's no
On Aug 17, 2009, at 11:30 AM, Gobeille, Robert wrote:
I use PSQL to set my editor to vi. This works as expected in psql, \e
brings up vi and I edit away.
Is there any way to set my psql command line editor to also use vi
(just like I do with "set -o vi" in bash)?
I can't find this in the docs
On Mon, Aug 17, 2009 at 6:17 PM, Tom Lane wrote:
> Bryan Murphy writes:
>> Here's the xmin/xmax/ctid for three problematic records:
>
>> prodpublic=# select xmin,xmax,ctid from items_extended where id in
>> ('34537ed90d7546d78f2c172fc8eed687', '3e1d99b7124742b7aaf2f869f7637b0e',
>> '499b464f141a48
On Mon, Aug 17, 2009 at 6:17 PM, Tom Lane wrote:
> Hm, what's your current XID counter? (pg_controldata would give an
> approximate answer.) I'm wondering if the xmax's are marked committed
> but are in the future ...
>
FWIW that doesn't look right. That would result in
HeapTupleBeingUpdated. Th
- "Nuno Mota" wrote:
> Thank you very much,
>
> Can i ask one more question ?
>
> How do I declare the correct result set to return, this in first
> example code, is it possible ?
>
> Thank you again,
> Nuno Mota
>
>
>From here:
http://www.postgresql.org/docs/8.3/interactive/plpython-
On Mon, Aug 17, 2009 at 12:41 PM, Tom Lane wrote:
> Bryan Murphy writes:
> > On Mon, Aug 17, 2009 at 12:17 PM, Tom Lane wrote:
> >> Hm, what's your current XID counter? (pg_controldata would give an
> >> approximate answer.) I'm wondering if the xmax's are marked committed
> >> but are in the
On Mon, Aug 17, 2009 at 11:56 AM, Chris
Barnes wrote:
> I am looking for pgbench. Is there a good source from which I can download
> the most current version?
If you installed from source, look under contrib for the pgbench subdirectory.
If you installed from your OS's package repository, try look
Bob Gobeille wrote:
> I use PSQL to set my editor to vi. This works as expected in psql,
> \e brings up vi and I edit away.
>
> Is there any way to set my psql command line editor to also use vi
> (just like I do with "set -o vi" in bash)?
> I can't find this in the docs.
I have in my .inputrc t
I have fixed the problem populating a list and returning it.
Well I guess I have to learn a litte bit more of python to understand how to
use yield when using multiple result sets.
Thank you anyway
On Mon, Aug 17, 2009 at 7:23 PM, Adrian Klaver wrote:
>
>
> - "Nuno Mota" wrote:
>
> > Tha
Ok, now I think I understand since I already have a result set from the
query I cannot use yield.
The other example works because I am generating only one result set.
On Mon, Aug 17, 2009 at 7:55 PM, Nuno Mota wrote:
> I have fixed the problem populating a list and returning it.
>
> Well I gues
Greg Stark writes:
> Excluding the cases where our own xid is in the tuple I think the
> relevant cases are either
> xmin aborted or in progress (or in future)
> MOVED_OFF and xvac committed
> MOVED_IN and xvac aborted or is in progress (or in future)
Ah. I hadn't bothered to check the code in
On 08/17/2009 03:24 AM, Craig Ringer wrote:
On 16/08/2009 9:06 PM, NTPT wrote:
So I suggest we should have "random_page_cost" and
"Sequential_page_cost" configurable on per tablespace basis.
That strikes me as a REALLY good idea, personally, though I don't know
enough about the planner to fact
On Aug 17, 2009, at 12:46 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I use PSQL to set my editor to vi. This works as expected in psql,
\e brings up vi and I edit away.
Is there any way to set my psql command line editor to also use vi
(just like I do with "set -o vi" in bash)?
I can't fi
Bob Gobeille wrote:
> >I have in my .inputrc this line:
> >
> > set editing-move vi
> >
> >and it works like a charm.
>
> I tried this and can't get it to work.
> 1) I tried putting that in my .bashrc script and sourcing the file
> (and also logging in again)
> 2) I did the set on the command
On Aug 17, 2009, at 1:18 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I have in my .inputrc this line:
set editing-move vi
and it works like a charm.
I tried this and can't get it to work.
1) I tried putting that in my .bashrc script and sourcing the file
(and also logging in aga
On Aug 17, 2009, at 12:15 PM, Bob Gobeille wrote:
On Aug 17, 2009, at 12:46 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I use PSQL to set my editor to vi. This works as expected in psql,
\e brings up vi and I edit away.
Is there any way to set my psql command line editor to also use vi
On Aug 17, 2009, at 1:46 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I use PSQL to set my editor to vi. This works as expected in psql,
\e brings up vi and I edit away.
Is there any way to set my psql command line editor to also use vi
(just like I do with "set -o vi" in bash)?
I can't fin
On Aug 17, 2009, at 1:27 PM, Steve Atkins wrote:
On Aug 17, 2009, at 12:15 PM, Bob Gobeille wrote:
On Aug 17, 2009, at 12:46 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I use PSQL to set my editor to vi. This works as expected in psql,
\e brings up vi and I edit away.
Is there any wa
On Aug 17, 2009, at 1:38 PM, kbarn...@kevinbarnard.net wrote:
On Aug 17, 2009, at 1:46 PM, Alvaro Herrera wrote:
Bob Gobeille wrote:
I use PSQL to set my editor to vi. This works as expected in psql,
\e brings up vi and I edit away.
Is there any way to set my psql command line editor to a
Hello,
For anyone who might be interested, I've started on a SQL parser
and pretty printer, written in Haskell.
It currently parses a subset of PostgreSql SQL and pl/pgsql, and
is pretty rough all round at the moment. If you're not using Haskell
it's probably not interesting to you.
You can get
On Mon, Aug 17, 2009 at 11:35:41AM +0200, David De Maeyer wrote:
> Being on a FreeBSD box, and having PostgreSQL compiled with default
> options, I am assuming timestamps are encoded as long long (a signed
> long for the date and an unsigned long for the time).
Integer timestamps are the number of
On Mon, Aug 17, 2009 at 7:59 PM, Tom Lane wrote:
> Greg Stark writes:
>> Excluding the cases where our own xid is in the tuple I think the
>> relevant cases are either
>
>> xmin aborted or in progress (or in future)
>> MOVED_OFF and xvac committed
>> MOVED_IN and xvac aborted or is in progress (or
On Mon, Aug 17, 2009 at 4:02 PM, Greg Stark wrote:
> For what it's worth at EDB I dealt with another case like this and I
> imagine others have too. I think it's too easy to do things in the
> wrong order or miss a step and end up with these kinds of problems.
>
> I would really like to know what
AFAIK postgresql measure characteristic of the data distribution in the
tables and indexes (that is what vacuum ANALYSE does) , but results of
that measures are **weighted by** random_page_cost and
sequential_page_cost. So measurements are correct, but costs (weight)
should reflect a real s
Thanks Alvaro,
I still need to be able to log statements from within functions... Can you
help with that?
2009/8/18 Alvaro Herrera
> Andrew Bartley escribió:
>
> > PS on this note, how do we log PIDS? This is another "need to have" for
> our
> > production systems. We log user activity and t
2009/8/17 Jeremy Harris :
> Could not pgsql *measure* these costs (on a sampling basis, and with long
> time-constants)?
In theory, sure. In practice, well, there are some engineering
challenges to solve.
1) The cost model isn't perfect so the it's not clear exactly what to
measure to get the bes
Ok, I've asked this a few times, but nobody ever responded. I think I
finally got it though, could somebody confirm my logic? Basically, you
setup a chain of servers, and when fails you replicate to the next link in
the chain, like so:
Master (A) --> Warm Standby (B) --> Warn Standby (C) --> etc
On 18/08/2009, at 9:36 AM, Bryan Murphy wrote:
Ok, I've asked this a few times, but nobody ever responded. I think
I finally got it though, could somebody confirm my logic?
Basically, you setup a chain of servers, and when fails you
replicate to the next link in the chain, like so:
Mast
messages (id, to_user, from_user, created)
1 | 1 | 2 | 2009-05-21
2 | 1 | 3 | 2009-06-21
3 | 1 | 4 | 2009-07-21
4 | 2 | 1 | 2009-05-10
5 | 2 | 3 | 2009-06-10
6 | 1 | 2 | 2009-07-10
How could I get the most recent message between two users?
--
Sent via pgsql-general mailing list (pgsql-general@po
On Mon, Aug 17, 2009 at 04:33:11PM -0700, Nick wrote:
> messages (id, to_user, from_user, created)
> 1 | 1 | 2 | 2009-05-21
> 2 | 1 | 3 | 2009-06-21
> 3 | 1 | 4 | 2009-07-21
> 4 | 2 | 1 | 2009-05-10
> 5 | 2 | 3 | 2009-06-10
> 6 | 1 | 2 | 2009-07-10
>
> How could I get the most recent message betwe
On Tue, Aug 18, 2009 at 1:25 AM, Yaroslav Tykhiy wrote:
> Encouraged by Bruce Momjian, I tried and had some success in this area. It
> was a controlled failover but it worked like a charm. An obvious condition
> was that the warm standbys be in perfect sync; you can't do the trick if
> some of th
Nick wrote:
messages (id, to_user, from_user, created)
1 | 1 | 2 | 2009-05-21
2 | 1 | 3 | 2009-06-21
3 | 1 | 4 | 2009-07-21
4 | 2 | 1 | 2009-05-10
5 | 2 | 3 | 2009-06-10
6 | 1 | 2 | 2009-07-10
How could I get the most recent message between two users?
Depends on what you want (all untested)
Thank you and sorry for the vagueness. The answer I was looking for
was Steves last suggestion - getting the newest messages between all
users which would return...
6 | 1 | 2 | 2009-07-10
5 | 2 | 3 | 2009-06-10
3 | 1 | 4 | 2009-07-21
2 | 1 | 3 | 2009-06-21
On Aug 17, 6:03 pm, scrawf...@pinpointre
So the information i have thus far is that, I am not easily able to log the
statements from a function.
Does anyone know why it was removed... that is it 7.2 logged this
information.
Thanks Again
Andrew Bartley
2009/8/18 Andrew Bartley
> Thanks Alvaro,
>
> I still need to be able to log state
That would be true if all units were always convertible to mm, but we
have volume also, we also have feet etc.. So that the easiest and
cleanest thing to do, with out having to throw the all the functions
into a case statement is an aggregate function that takes the 2 unit
types and then gives back
73 matches
Mail list logo