Re: [GENERAL] Import German Number Format

2008-10-03 Thread Leif B. Kristensen
On Thursday 2. October 2008, Tim Semmelhaack wrote:
>Hello,
>
>I have to import a huge number of data sets of data sets with "Copy
> from".
>
>The numbers are formatted with decimal comma ',' (as usual in Germany)
>instead of the decimal point '.'
>
>When I try to import this data Postgres crashes, so I think I have to
>change a parameter with SET? Does anybody know which parameter I have
>to change?

s/(\d{2}),(\d{2}),(\d{4})/$1.$2.$3/g
-- 
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Getting rows in statement-level triggers

2008-10-03 Thread Tom Lane
Artacus <[EMAIL PROTECTED]> writes:
> Ok, so it took a lot of googling to figure this one out, but you can do 
> it with something like so.

> SELECT *
> FROM strand_scores
> WHERE xmin::text = txid_current()::text

This will not work, or at least it will stop working after your
installation passes 4 billion transactions.

The traditional way to find out your own XID is to insert a dummy row
somewhere (perhaps in a temp table) and see what its xmin is.  I'm not
sure why we don't expose a more convenient way --- maybe just that
there's not been any demand for it.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] error compiling postgres source

2008-10-03 Thread Hiroshi Saito

Hi Roshni-san.

First, thank you for the report of a good result. However, I don't know well about 
libpqxx Therefore, pushes on GENERAL-ML. Someone may be able to support.?


Regards,
Hiroshi Saito

- Original Message - 
From: "Roshni Mani" <[EMAIL PROTECTED]>

To: "Hiroshi Saito" <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2008 1:27 PM
Subject: RE: [GENERAL] error compiling postgres source


Hi,

 Thanks a lot for the help..i was able to compile postgres. I wanted
to use libpqxx in windows.it was specified in install.txt to compile
postgresql source,and it is said we hav to change the common file in
win32 folder and run the libpqxx.mak file to compile libpqxx.But there
is no "libpqxx.mak".A file named vc-libpqxx.mak.template is there
.should I hav to modify that file to compile libpqxx ??if u hav any idea
plz help me on that.

Thanks and regards
Roshni.

-Original Message-
From: Hiroshi Saito [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 01, 2008 6:31 PM

To: Roshni Mani
Subject: Re: [GENERAL] error compiling postgres source

Hi .

Ok, You can choose the environment of specification of SDK from a start
menu.!
Please see:-)

Regards,
Hiroshi Saito

- Original Message - 
From: "Roshni Mani" <[EMAIL PROTECTED]>

To: "Hiroshi Saito" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2008 7:54 PM
Subject: RE: [GENERAL] error compiling postgres source


Hi,

  I have installed SDK separatelycan you tell me what environment
variables to set??i'm new to this kind of things..

Thanks in advance,
Roshni

-Original Message-
From: Hiroshi Saito [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 01, 2008 3:01 PM

To: Roshni Mani
Subject: Re: [GENERAL] error compiling postgres source

Hi.

Is SDK set in the environment which you use? 
win32.mak can be used with Microsoft Visual C++ 2005 Edition 
However, SDK is independently required. and environment settings.
 
Regards,

Hiroshi SAito

- Original Message - 
From: "Roshni Mani" <[EMAIL PROTECTED]>

To: "Hiroshi Saito" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2008 6:14 PM
Subject: RE: [GENERAL] error compiling postgres source


Hi,

  Thanks for the reply .i deleted the said files ...but still the same
errors are coming..

Thanks and regards,
Roshni

-Original Message-
From: Hiroshi Saito [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 01, 2008 2:38 PM

To: Roshni Mani; pgsql-general@postgresql.org
Subject: Re: [GENERAL] error compiling postgres source


Hi.

It is strange?_?

pg_config.h and pg_config_os.h must be copied as below.

C:\MinGW\home\HIROSHI\postgresql-8.3.3\src\interfaces\libpq>nmake -f
win32.mak
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.
Building the Win32 static library...
(snip)
   copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
   1 file(s) copied.
   echo #define SYSCONFDIR "" > pg_config_paths.h
   copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
   1 file(s) copied.
(snip)

Please delete following two files before compile.
del ..\..\include\pg_config.h ..\..\include\pg_config_os.h

- Original Message - 
From: Roshni Mani

To: pgsql-general@postgresql.org
Sent: Wednesday, October 01, 2008 3:13 PM
Subject: [GENERAL] error compiling postgres source

Hi ,

  Can somebody tell me the solution for this.i tried compiling postgres
as follows in 
vs2005 .its giving the following errors



E:\postgresql-8.3.1\src\interfaces\libpq>nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

Building the Win32 static library...

Using default OpenSSL Include directory: C:\OpenSSL\include
Using default OpenSSL Library directory: C:\OpenSSL\lib\VC
Using default Kerberos Include directory: C:\kfw-2.6.5\inc
Using default Kerberos Library directory: C:\kfw-2.6.5\lib\i386
   cl.exe @C:\DOCUME~1\roma\LOCALS~1\Temp\nm3E.tmp
getaddrinfo.c
..\..\include\libpq/pqcomm.h(64) : error C2079: 'addr' uses undefined
struct 
'sockaddr_storage'

..\..\port\getaddrinfo.c(144) : error C2079: 'hints' uses undefined
struct 'addrinfo'
..\..\port\getaddrinfo.c(159) : error C2224: left of '.ai_family' must
have struct/union 
type

..\..\port\getaddrinfo.c(160) : error C2224: left of '.ai_socktype' must
have struct/union 
type

..\..\port\getaddrinfo.c(165) : error C2224: left of '.ai_family' must
have struct/union 
type

..\..\port\getaddrinfo.c(165) : error C2224: left of '.ai_family' must
have struct/union 
type

..\..\port\getaddrinfo.c(168) : error C2224: left of '.ai_socktype' must
have struct/union 
type

..\..\port\getaddrinfo.c(169) : error C2224: left of '.ai_socktype' must
have struct/union 
type

..\..\port\getaddrinfo.c(182) : error C2224: left of '.ai_flags' must
have struct/union type
..\..\port\getaddrinfo.c(223) : error C2224: left of '.ai_flags' must
have struct/union type
..\.

Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Rob Richardson
RAISE NOTICE won't help (I don't think) because the notice isn't visible from 
inside the C++ application, so the user won't know that a problem occured.  
 
I think I just came up with a thoroughly ugly idea.  The database supports an 
annealing shop, in which coils are assigned to charges.  After the check fails, 
I end up with coils assigned to a charge that does not exist.  I could set up a 
job that runs every minute and checks all coils with status "Assigned" to make 
sure that the associated charges actually exist.  That would fix another 
recurring problem, in which a user intentionally deletes a charge but the 
charge's coils stay assigned to that charge.  We haven't tracked that down yet, 
but this job would fix that too.
 
Now all I have to do is learn how to set up a job.  I only know about them from 
overhearing colleagues talking.
 
RobR



From: Jaime Casanova [mailto:[EMAIL PROTECTED]
Sent: Thu 10/2/2008 10:11 PM
To: Alvaro Herrera
Cc: Rob Richardson; pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?



On Thu, Oct 2, 2008 at 8:44 PM, Alvaro Herrera
<[EMAIL PROTECTED]> wrote:
> Rob Richardson wrote:
>
>> Here's what I need to do:
>>
>> IF query_check_fails THEN
>> UPDATE some_table SET some_value = 0 WHERE some_condition_is_true;
>> RAISE EXCEPTION 'Look, you idiot, do it right next time!';
>> END;
>>
>> I need the update to work, but I need to raise the exception so the C++
>> code recognizes the error.  How can I do both?
>
> You need an autonomous transaction, which Postgres does not support
> directly but you can implement using dblink or a plperl function that
> connects back to the database.
>

what about RAISE NOTICE?

--
regards,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157




Re: [GENERAL] [ADMIN] 8.3.4 rpms for Opensuse10.3 64bit

2008-10-03 Thread mm2010



Devrim GÜNDÜZ wrote:
> 
> Hi Peter,
> 
> On Tue, 2008-09-23 at 23:09 +0300, Peter Eisentraut wrote:
>> SLES builds have been broken for a while.  I have not analyzed that
>> yet. 
>>   Bugs and patches welcome.
> 
> https://projects.commandprompt.com/public/pgcore/repo/rpm/suse/8.3/SLES-10/postgresql.spec
> 
> (it is using self-signed cert, so please ignore SSL warnings)
> 
> I applied a few cosmetic changes, too. This version builds on SLES 10.2
> cleanly.
> 
> I also found the reason why libpgport.a is removed (see spec file for
> that). If you don't have any objections, I'm inclined to remove that
> part from spec, so that we can compile Slony-I, too.
> 
> This is not a very good spec file for me, but at least it compiles.
> 
> Regards,
> -- 
> Devrim GÜNDÜZ, RHCE
> devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
>http://www.gunduz.org
> 
>  
> 

Hi,

Google led me to this forum (and this post) for which I am very grateful.
I'd be willing to help but I have neither the knowledge nor many resources
besides the Net. I am a developer using Postgres as my DB. But anyway if
there's something I could do, please shout.

Is there any further news on this post yet?

Thanks & Best Regards - JB



-- 
View this message in context: 
http://www.nabble.com/8.3.4-rpms-for-Opensuse10.3-64bit-tp19621948p19796865.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Tom Lane
"Rob Richardson" <[EMAIL PROTECTED]> writes:
> I think I just came up with a thoroughly ugly idea.  The database
> supports an annealing shop, in which coils are assigned to charges.
> After the check fails, I end up with coils assigned to a charge that
> does not exist.  I could set up a job that runs every minute and
> checks all coils with status "Assigned" to make sure that the
> associated charges actually exist.  That would fix another recurring
> problem, in which a user intentionally deletes a charge but the
> charge's coils stay assigned to that charge.

Why don't you have a foreign key constraint from coils to charges?

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] INITDB in VISTA

2008-10-03 Thread Anderson dos Santos Donda
Hi Friends!!

I install the postgre 8.3 by command line :

msiexec /i postgresql-8.3-int.msi /qr ADDLOCAL=server,psql,pgadmin
INTERNALLAUNCH=1 DOSERVICE=1 DOINITDB=1 ENCODING=UTF8
SERVICEDOMAIN="%COMPUTERNAME%" SERVICEACCOUNT="postgre_service"
SERVICEPASSWORD="passWorD" CREATESERVICEUSER=1
SERVICENAME="PGServiceDatabase" SUPERUSER="postgres"
SUPERPASSWORD="otHErPass" PERMITREMOTE=0 PL_PGSQL=1 NOSHORTCUTS=1
BASEDIR="C:\postgre" TRANSFORMS=:lang_pt_br


And, i don't have any problems whit it, but now, some Windows Vista doesn't
allow to execute the initdb.exe, and I need to change DOINITDB=1 to 0 (
DOINITDB=0).

After installation, I to execute manualy the initdb.

But when I go to "Panel Control" > Adminstrative Tools >  Service and try to
start my service, it doesn't start.

What I need to do to start the service by Administrative Tools?

Thanks for helps


[GENERAL] ]OT] Parsing postgresql.conf archive_command

2008-10-03 Thread Joey K.
Hello,


I'd like to get the path configured for archive_command in a shell script

I've used a file with following content as an example (postgresql.conf),

# archive_command = cp %p /backup/%r
  # archive_command = cp %p /backup/%r
# archive_command = cp %p /backup/%r
#archive_command = cp %p /backup/%r
   archive_command = 'cp %p /backup/wal/%f'

This is what I been trying.
$ awk '!/[ \t]*#/ { sub(/%f$/, "", $NF); print $NF }' postgresql.conf

and I get
/backup/wal/%f'

Any idea how to get rid of "%f'"  so that I get only?
/backup/wal/

My regexp skills are sad :-)

Steve


[GENERAL]

2008-10-03 Thread bull



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Rob Richardson
That's how it should have been done, but it wasn't.  It's too late to
change it now.  If I make any change to the C++ code, I run into a
horrible case of DLL Hell.  I told my bosses that if we change any C++
code at that site, we have to change all of it.  So I need a pure
database solution.  Or maybe something else.  Now I'm thinking of a
Python script, of which there are several running on site.

RobR


-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2008 8:47 AM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception? 

"Rob Richardson" <[EMAIL PROTECTED]> writes:
> I think I just came up with a thoroughly ugly idea.  The database 
> supports an annealing shop, in which coils are assigned to charges.
> After the check fails, I end up with coils assigned to a charge that 
> does not exist.  I could set up a job that runs every minute and 
> checks all coils with status "Assigned" to make sure that the 
> associated charges actually exist.  That would fix another recurring 
> problem, in which a user intentionally deletes a charge but the 
> charge's coils stay assigned to that charge.

Why don't you have a foreign key constraint from coils to charges?

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Raymond O'Donnell
On 03/10/2008 14:52, Rob Richardson wrote:
> That's how it should have been done, but it wasn't.  It's too late to
> change it now.  If I make any change to the C++ code, I run into a

But setting up a foreign key constrain is something you do in the
database, not in the app - can't you do that?

Ray.

--
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
[EMAIL PROTECTED]
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
--

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Rob Richardson
No, because the application first saves the coils and then saves the
charge.  Setting up the foreign key constraint would prevent any coils
from being saved because the charge record would never exist at the time
the coil record was created.

RobR, who would love to hear some of the music in Galway Cathedral!

-Original Message-
From: Raymond O'Donnell [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2008 10:53 AM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?

On 03/10/2008 14:52, Rob Richardson wrote:
> That's how it should have been done, but it wasn't.  It's too late to 
> change it now.  If I make any change to the C++ code, I run into a

But setting up a foreign key constrain is something you do in the
database, not in the app - can't you do that?

Ray.

--
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
[EMAIL PROTECTED] Galway Cathedral Recitals:
http://www.galwaycathedral.org/recitals
--

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Getting rows in statement-level triggers

2008-10-03 Thread Alvaro Herrera
Tom Lane wrote:

> The traditional way to find out your own XID is to insert a dummy row
> somewhere (perhaps in a temp table) and see what its xmin is.  I'm not
> sure why we don't expose a more convenient way --- maybe just that
> there's not been any demand for it.

I think we've suggested the trick of checking the xmin of some row
enough times that a better way to access it is warranted.  There's
certainly been more demand than "not any".

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Blazej
Maybe try pltclu - you may use socket (TCP/IP) or to write data to OS
filesystem. I was doing in pltclu very similar things.

Write what you concrete watnts (in points), then I will try to write
you scripts.

Regards
Blazej


2008/10/3 Rob Richardson <[EMAIL PROTECTED]>:
> That's how it should have been done, but it wasn't.  It's too late to
> change it now.  If I make any change to the C++ code, I run into a
> horrible case of DLL Hell.  I told my bosses that if we change any C++
> code at that site, we have to change all of it.  So I need a pure
> database solution.  Or maybe something else.  Now I'm thinking of a
> Python script, of which there are several running on site.
>
> RobR
>
>
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 03, 2008 8:47 AM
> To: Rob Richardson
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] How do I save data and then raise an exception?
>
> "Rob Richardson" <[EMAIL PROTECTED]> writes:
>> I think I just came up with a thoroughly ugly idea.  The database
>> supports an annealing shop, in which coils are assigned to charges.
>> After the check fails, I end up with coils assigned to a charge that
>> does not exist.  I could set up a job that runs every minute and
>> checks all coils with status "Assigned" to make sure that the
>> associated charges actually exist.  That would fix another recurring
>> problem, in which a user intentionally deletes a charge but the
>> charge's coils stay assigned to that charge.
>
> Why don't you have a foreign key constraint from coils to charges?
>
>regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Getting rows in statement-level triggers

2008-10-03 Thread Artacus



SELECT *
FROM strand_scores
WHERE xmin::text = txid_current()::text



This will not work, or at least it will stop working after your
installation passes 4 billion transactions.

The traditional way to find out your own XID is to insert a dummy row
somewhere (perhaps in a temp table) and see what its xmin is.  I'm not
sure why we don't expose a more convenient way --- maybe just that
there's not been any demand for it.

regards, tom lane
Well the good news there is that it won't break during the period we 
have to provide free bug fixes :)

Inserting a row to get the xid seems pretty kludgy.

If you wouldn't mind answering a few more questions Tom:

   * So what exactly happens at the 4 billion mark?
   * Why can't I cast an xid to int or bigint?
   * The table in question is the largest in the db. How performative
 is it to query based on xmin? Is xmin indexed? Can it be?

BTW, if there were no demand for a convenient way to get your xid, then 
there shouldn't be a "traditional" way :)


Artacus


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception? -- solved

2008-10-03 Thread Rob Richardson
My thanks to all who contributed thoughts about my question.  I have put
a two-part solution into place.  The trigger function that fires when
charges are inserted raises the exception, but leaves the possibility of
dangling coils (coils with the numbers of charges that do not exist in
the database).  A Python script running under the control of a service
checks every minute for dangling coils and removes their charge numbers.
This is not ideal, but it works.  It has the added benefit of handling
dangling coils that have shown up from another (as yet unidentified)
cause occasionally.

RobR 

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Scott Marlowe
On Fri, Oct 3, 2008 at 8:56 AM, Rob Richardson
<[EMAIL PROTECTED]> wrote:
> No, because the application first saves the coils and then saves the
> charge.  Setting up the foreign key constraint would prevent any coils
> from being saved because the charge record would never exist at the time
> the coil record was created.

You should be able to set your constraints to deferrable initially
deferred and get proper behaviour even with that update system.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Standalone Windows Installation

2008-10-03 Thread Jörn Heid
So, nobody knows how to make the official "Postgres without Installer" 
to work with a normal Windows installation?


Jörn

Jörn Heid schrieb:

Okay, that's a misunderstanding.
I don't want to build it from the sources. I want to take the official 
pre-built "postgres without installer" package and put it on a Windows 
machine to make it work. That doesn't work (while it should IMHO) 
because of the dependencies. So I just want to add some 
manifest/folders/dlls to make it work with the standard binaries. I 
hope it would be possible as I don't want to rebuild all on each 
postgres update.


Jörn

Ashesh D Vashi schrieb:

Jörn Heid wrote:

Thanks Ashesh for your answer.

I will try to do so although I first have to install VC (or can I 
just use the directories from WinSxS?). Is there another possibility 
without setting an environment variable? Think of the simplest 
distribution of just copying files (e.g. to a USB stick) and 
"pg_ctrl.exe start" will work out of the box...
I thought - you have built the binaries from sources. So, I was 
talking about VC installation.
My solution should work perfectly, when you have built the binaries 
from sources using Visual Studio.
Redistribution (copying) of these binaries should work anywhere. (You 
may need to add dependent dll(s) in the distribution package. i.e. 
ssl, krb5)


Regards,
Ashesh

EnterpriseDB: http://www.enterprisedb.com



Cheers,
Jörn

Ashesh D Vashi schrieb:

Jörn Heid wrote:

Hi.

I want to use Postgres without installation. The problem is the 
dependencies on the Visual C dll (msvcrt).
As far as I know it would be possible to include a manifest file 
(only for libpq.dll?) and bundle the dlls from c:\windows\WinSxS 
into the bin directory of Postgres.

Is this correct? Does anybody have (tested) such a manifest file?

Jörn
You just need to copy the contents of the redist/x86 under the 
%VCINSTALLDIR% in your distribution directory, where all 
dlls/executables are present.
VCINSTALLDIR should be similar to C:\Program Files\Microsoft Visual 
Studio 8\VC, depending on your Visual Studio Installation.

This directory contains:
* Microsoft.VCxx.CRT
* Microsoft.VCxx.ATL
..., etc

No need to copy the c:\windows\WinSxS contents.

Hope this should solve your problem.

Regards,
Ashesh


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Static functions

2008-10-03 Thread Joseph S

Aren't static functions supposed to executed only once per transaction?

I have a query plan that looks like this:

 Unique  (cost=441872.58..441875.39 rows=562 width=4)
   ->  Sort  (cost=441872.58..441873.98 rows=562 width=4)
 Sort Key: elog.uid
 ->  Nested Loop  (cost=89.52..441846.91 rows=562 width=4)
   ->  Index Scan using j_unique_seqno on j 
(cost=0.00..678.70 rows=49 width=4)

 Index Cond: (pod = 335)
 Filter: ((mtotal > 0) AND (stdate > '2008-01-01 
00:00:00-05'::timestamp with time zone) AND (stdate < '2008-10-03 
23:59:59-04'::timestamp with time zone))
   ->  Bitmap Heap Scan on elog  (cost=89.52..8975.15 
rows=2263 width=8)
 Recheck Cond: ((j.id = elog.jid) AND (elog."type" 
= ANY ('{1,4}'::integer[])))
 Filter: (id >= elog_date_search('2008-01-01 
00:00:00'::timestamp without time zone))
 ->  Bitmap Index Scan on elog_jid_type_type 
(cost=0.00..89.43 rows=2263 width=0)
   Index Cond: ((j.id = elog.jid) AND 
(elog."type" = ANY ('{1,4}'::integer[])))

(12 rows)

That query is taking forever because my function elog_date_search() is 
being called each time through the loop, and the pg process ends up 
eating %100 of a cpu for a few minutes.  If I replace elog_date_search() 
in my SELECT with the result the query takes a few seconds.


This is with:

 PostgreSQL 8.2.10 on x86_64-unknown-linux-gnu, compiled by GCC gcc 
(GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Static functions

2008-10-03 Thread Joseph Shraibman

Umm  r/static/stable

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Standalone Windows Installation

2008-10-03 Thread Joshua Drake
On Fri, 03 Oct 2008 21:02:27 +0200
Jörn Heid <[EMAIL PROTECTED]> wrote:

> So, nobody knows how to make the official "Postgres without
> Installer" to work with a normal Windows installation?

http://www.postgresql.org/docs/faqs.FAQ_MINGW.html

Have fun.


Joshua D. Drake


-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Standalone Windows Installation

2008-10-03 Thread Jörn Heid
Thanks for your answer but here's the longer question as asked in the 
posts before:


How can I use the official "Postgres without installer" distribution 
without compiling the sources for myself and without having to install 
the redistribution application of the VC dlls so that I can distribute 
an "all-inside" folder with all needed binaries, dlls and so on for all 
Windows installations? Is it possible perhaps with a manifest file and 
bundled dlls or is it impossible?


Jörn

Joshua Drake schrieb:

On Fri, 03 Oct 2008 21:02:27 +0200
Jörn Heid <[EMAIL PROTECTED]> wrote:

  

So, nobody knows how to make the official "Postgres without
Installer" to work with a normal Windows installation?



http://www.postgresql.org/docs/faqs.FAQ_MINGW.html

Have fun.


Joshua D. Drake


  


--
Dipl.-Inform. Med. Jörn Heid

Zentrum für virtuelle Patienten / Centre for Virtual Patients
Universitätsklinikum Heidelberg
Hygiene-Institut
Im Neuenheimer Feld 324
69120 Heidelberg

Tel.:  +49-(0)7131-504-481
Fax:   +49-(0)7131-252-470


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Rob Richardson
I didn't see anything in the documentation about deferred constraints.
Can you point to someplace where I can read about them?

Thank you!

RobR
 

-Original Message-
From: Scott Marlowe [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2008 2:59 PM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?

On Fri, Oct 3, 2008 at 8:56 AM, Rob Richardson
<[EMAIL PROTECTED]> wrote:
> No, because the application first saves the coils and then saves the 
> charge.  Setting up the foreign key constraint would prevent any coils

> from being saved because the charge record would never exist at the 
> time the coil record was created.

You should be able to set your constraints to deferrable initially
deferred and get proper behaviour even with that update system.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Static functions

2008-10-03 Thread Tom Lane
Joseph S <[EMAIL PROTECTED]> writes:
> Aren't static functions supposed to executed only once per transaction?

There's no promise of that.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] failed to install posgrest

2008-10-03 Thread Eduardo Arévalo
Hi I am trying to install the portgres of 64btis in centos 5.6 but at the
next command ./postgresql-8.3.4-1-linux-x64.bin
the results are as follows:

[EMAIL PROTECTED] programas]# ./postgresql-8.3.4-1-linux-x64.bin

Welcome to the PostgreSQL Setup Wizard.


Please specify the directory where PostgreSQL will be installed.

Installation Directory [/opt/PostgreSQL/8.3]: /usr/local/postgresql_8.3


Please select a directory under which to store your data.

Data Directory [/usr/local/postgresql_8.3/data]: /base/data


*Error: The existing data directory (catalog version: 200611241) is not
compatible with this server (catalog version: 200711281).*
Press [Enter] to continue :

thanks for help


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Joshua Drake
On Fri, 3 Oct 2008 15:18:26 -0500
"Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:

> Hi I am trying to install the portgres of 64btis in centos 5.6 but at
> the next command ./postgresql-8.3.4-1-linux-x64.bin
> the results are as follows:

We don't distribute .bin files I would strongly suggest using the
rpm based packages for Centos.

Joshua D. Drake

-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How do I save data and then raise an exception?

2008-10-03 Thread Scott Marlowe
On Fri, Oct 3, 2008 at 1:48 PM, Rob Richardson
<[EMAIL PROTECTED]> wrote:
> I didn't see anything in the documentation about deferred constraints.
> Can you point to someplace where I can read about them?

http://www.postgresql.org/docs/8.3/static/sql-createtable.html

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Dave Page
On Fri, Oct 3, 2008 at 9:31 PM, Joshua Drake <[EMAIL PROTECTED]> wrote:
> On Fri, 3 Oct 2008 15:18:26 -0500
> "Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:
>
>> Hi I am trying to install the portgres of 64btis in centos 5.6 but at
>> the next command ./postgresql-8.3.4-1-linux-x64.bin
>> the results are as follows:
>
> We don't distribute .bin files I would strongly suggest using the
> rpm based packages for Centos.

Yes we do - and simply switching to the RPM distro is unlikely to
solve the problem as the OP is obviously not aware of the what the
problem is and will probably grab the latest version available.

Eduardo; the error you see occurs because the data directory you have
is not compatible with the PostgreSQL version you are trying to
install. Given the catalog version number the installer is reporting
that it's found, your existing data directory is from PostgreSQL 8.2.
You should therefore install the latest 8.2 RPM (or build from
source), as the one-click installer is not available for the 8.2
series.

Why you have a PG 8.2 data directory under /usr/local/postgresql_8.3
is another question entirely...

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Joshua Drake
On Fri, 3 Oct 2008 22:12:08 +0100
"Dave Page" <[EMAIL PROTECTED]> wrote:

> On Fri, Oct 3, 2008 at 9:31 PM, Joshua Drake <[EMAIL PROTECTED]>
> wrote:
> > On Fri, 3 Oct 2008 15:18:26 -0500
> > "Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:
> >
> >> Hi I am trying to install the portgres of 64btis in centos 5.6 but
> >> at the next command ./postgresql-8.3.4-1-linux-x64.bin
> >> the results are as follows:
> >
> > We don't distribute .bin files I would strongly suggest using
> > the rpm based packages for Centos.
> 
> Yes we do - and simply switching to the RPM distro is unlikely to
> solve the problem as the OP is obviously not aware of the what the
> problem is and will probably grab the latest version available.

Where do we distribute .bin files?

Joshua D. Drake
-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Dave Page
On Fri, Oct 3, 2008 at 10:13 PM, Joshua Drake <[EMAIL PROTECTED]> wrote:
> On Fri, 3 Oct 2008 22:12:08 +0100
> "Dave Page" <[EMAIL PROTECTED]> wrote:
>
>> On Fri, Oct 3, 2008 at 9:31 PM, Joshua Drake <[EMAIL PROTECTED]>
>> wrote:
>> > On Fri, 3 Oct 2008 15:18:26 -0500
>> > "Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:
>> >
>> >> Hi I am trying to install the portgres of 64btis in centos 5.6 but
>> >> at the next command ./postgresql-8.3.4-1-linux-x64.bin
>> >> the results are as follows:
>> >
>> > We don't distribute .bin files I would strongly suggest using
>> > the rpm based packages for Centos.
>>
>> Yes we do - and simply switching to the RPM distro is unlikely to
>> solve the problem as the OP is obviously not aware of the what the
>> problem is and will probably grab the latest version available.
>
> Where do we distribute .bin files?

http://www.postgresql.org/download/linux

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Joshua Drake
On Fri, 3 Oct 2008 22:14:22 +0100
"Dave Page" <[EMAIL PROTECTED]> wrote:

> >> Yes we do - and simply switching to the RPM distro is unlikely to
> >> solve the problem as the OP is obviously not aware of the what the
> >> problem is and will probably grab the latest version available.
> >
> > Where do we distribute .bin files?
> 
> http://www.postgresql.org/download/linux


No that is a link to another vendors open source software. That is not
a .Org file. Note I am not arguing to remove the link but it is
certainly not software that is "distributed by PostgreSQL.Org".

Sincerely,

Joshua D. Drake
 


-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Static functions

2008-10-03 Thread Volkan YAZICI
On Fri, 03 Oct 2008, Joseph S <[EMAIL PROTECTED]> writes:
> Aren't static functions supposed to executed only once per transaction?

There is no such promise, that depends on the PL you prefer. For
instance, in PL/scheme[1] non-volatile (immutable) and non-SRF functions
are cached per (top) transaction.


Regards.

[1] http://plscheme.projects.postgresql.org/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Scott Marlowe
On Fri, Oct 3, 2008 at 2:31 PM, Joshua Drake <[EMAIL PROTECTED]> wrote:
> On Fri, 3 Oct 2008 15:18:26 -0500
> "Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:
>
>> Hi I am trying to install the portgres of 64btis in centos 5.6 but at
>> the next command ./postgresql-8.3.4-1-linux-x64.bin
>> the results are as follows:
>
> We don't distribute .bin files I would strongly suggest using the
> rpm based packages for Centos.

I much prefer the PGDG RHEL5 rpms on Centos5.  IT's much easier to
update and they work very very well.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Dave Page
On Fri, Oct 3, 2008 at 10:46 PM, Joshua Drake <[EMAIL PROTECTED]> wrote:
>> http://www.postgresql.org/download/linux
>
>
> No that is a link to another vendors open source software. That is not
> a .Org file.

By the same token, neither is anything on the Yum repository (as
sponsored by Command Prompt), or Fink, or MacPorts, or FreeBSD Ports
or Debian/Ubuntu APT, or the SUSE download site...

So what's your point exactly? Do we only offer support for source,
Win32, Solaris and PGDG RPM builds downloaded form ftp.postgresql.org
here now?


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Dave Page
On Fri, Oct 3, 2008 at 10:39 PM, Eduardo Arévalo <[EMAIL PROTECTED]> wrote:
> Now I am in the language I get the following screen:
>
...
> [620] zh_HK
> [621] zh_HK.utf8
> [622] zh_SG
> [623] zh_SG.utf8
> [624] zh_TW
> [625] zh_TW.euctw
> [626] zh_TW.utf8
> [627] zu_ZA
> [628] zu_ZA.iso88591
> [629] zu_ZA.utf8
> Please choose an option [1] :
>
> that option if I want to put the Spanish language

By the looks of it you are running the installer in text mode which I
don't believe I ever actually tried but one (or more) of those
629(!) locales it found on your system is presumably es_ES. Scroll
your terminal back up until you find it and enter it's number. Or,
just select the default option (1) which will setup the locale to
whatever initdb finds you are already running, which presumably is
Spanish.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Joshua Drake
On Sat, 4 Oct 2008 00:00:03 +0100
"Dave Page" <[EMAIL PROTECTED]> wrote:

> On Fri, Oct 3, 2008 at 10:46 PM, Joshua Drake <[EMAIL PROTECTED]>
> wrote:
> >> http://www.postgresql.org/download/linux
> >
> >
> > No that is a link to another vendors open source software. That is
> > not a .Org file.
> 
> By the same token, neither is anything on the Yum repository (as
> sponsored by Command Prompt), or Fink, or MacPorts, or FreeBSD Ports
> or Debian/Ubuntu APT, or the SUSE download site...

Yes that would be correct.

> 
> So what's your point exactly? Do we only offer support for source,
> Win32, Solaris and PGDG RPM builds downloaded form ftp.postgresql.org
> here now?
> 

Easy Dave. I was simply trying to figure out where the .bin came from,
which in turn came with a recommendation which I stand by that no one
should be using anything but operating supported packages (in this
case RPM, and assuming the package is available). 

I think it is also important to make a distinction that it is not
a .Org distributed file, so "if" there is a problem we can point the
user in the right direction to get help. Which may or may not be on
this list.

Joshua D. Drake


-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Getting rows in statement-level triggers

2008-10-03 Thread Tom Lane
Artacus <[EMAIL PROTECTED]> writes:
>> This will not work, or at least it will stop working after your
>> installation passes 4 billion transactions.

> * So what exactly happens at the 4 billion mark?

txid keeps going (that's why it's a bigint).  xid will wrap around.

> * Why can't I cast an xid to int or bigint?

No very strong reason except that no such code is provided...
but you do have to think hard about the fact that xid comparison
is circular and does not work at all like integer comparison.

> * The table in question is the largest in the db. How performative
>   is it to query based on xmin? Is xmin indexed? Can it be?

Not very, no, and no.

If you were really desperate you could make an indexed bigint column
that was filled with current_txid by an insert/update trigger, and
then search on that.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] ]OT] Parsing postgresql.conf archive_command

2008-10-03 Thread Erik Jones


On Oct 3, 2008, at 6:05 AM, Joey K. wrote:


Hello,


I'd like to get the path configured for archive_command in a shell  
script


I've used a file with following content as an example  
(postgresql.conf),


# archive_command = cp %p /backup/%r
  # archive_command = cp %p /backup/%r
# archive_command = cp %p /backup/%r
#archive_command = cp %p /backup/%r
   archive_command = 'cp %p /backup/wal/%f'

This is what I been trying.
$ awk '!/[ \t]*#/ { sub(/%f$/, "", $NF); print $NF }' postgresql.conf

and I get
/backup/wal/%f'

Any idea how to get rid of "%f'"  so that I get only?
/backup/wal/

My regexp skills are sad :-)


I usually prefer to string together more simple command than to  
compress it into one awkward command:


dirname `grep -E '^archive_command' postgresqlc.conf | awk '{print  
$NF}' | awk -F\' '{print $1}'`


dirname will directory component of a path (dirname /backup/wal/%f => / 
backup/wal)


So, that's dirname on the results of grepping for the line that starts  
with archive_command piped through a basic awk (split on spaces)  
printing the last filed piped through an awk splitting on a single  
quote printing the first field.


Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
(415) 963-4410 x 260
Location: US/Pacific
IRC: mage2k





--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] failed to install posgrest

2008-10-03 Thread Gurjeet Singh
On Sat, Oct 4, 2008 at 2:42 AM, Dave Page <[EMAIL PROTECTED]> wrote:

> On Fri, Oct 3, 2008 at 9:31 PM, Joshua Drake <[EMAIL PROTECTED]> wrote:
> > On Fri, 3 Oct 2008 15:18:26 -0500
> > "Eduardo Arévalo" <[EMAIL PROTECTED]> wrote:
> >
> >> Hi I am trying to install the portgres of 64btis in centos 5.6 but at
> >> the next command ./postgresql-8.3.4-1-linux-x64.bin
> >> the results are as follows:
> >
> > We don't distribute .bin files I would strongly suggest using the
> > rpm based packages for Centos.
>
> Yes we do - and simply switching to the RPM distro is unlikely to
> solve the problem as the OP is obviously not aware of the what the
> problem is and will probably grab the latest version available.
>
> Eduardo; the error you see occurs because the data directory you have
> is not compatible with the PostgreSQL version you are trying to
> install. Given the catalog version number the installer is reporting
> that it's found, your existing data directory is from PostgreSQL 8.2.
> You should therefore install the latest 8.2 RPM (or build from
> source), as the one-click installer is not available for the 8.2
> series.
>
> Why you have a PG 8.2 data directory under /usr/local/postgresql_8.3
> is another question entirely...


OP has data directory in /base/data, /usr/local/postgresql_8.3/data is the
default from the installer.
...
Data Directory [/usr/local/postgresql_8.3/data]: /base/data
...

Best regards,
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB  http://www.enterprisedb.com

Mail sent from my BlackLaptop device


Re: [GENERAL] Static functions

2008-10-03 Thread Gurjeet Singh
On Sat, Oct 4, 2008 at 1:36 AM, Tom Lane <[EMAIL PROTECTED]> wrote:

> Joseph S <[EMAIL PROTECTED]> writes:
> > Aren't static functions supposed to executed only once per transaction?
>
> There's no promise of that.
>

Can this be changed? Or does it work only in simpler queries, based on some
result-caching criteria?

Shouldn't PG make all efforts to not execute something when the result is
already known?

-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB  http://www.enterprisedb.com

Mail sent from my BlackLaptop device


Re: [GENERAL] Standalone Windows Installation

2008-10-03 Thread Martin Gainty

Jörn

a Microsoft Windows Installer is supposed to do:
a)configure any/all server binaries to work as a Windows Service (take a look 
at Admin/CPanel/Services) ..
b)retain these configurations in the windows registry as identified by CLSID (a 
unique ID which tracks
the binaries characteristics such as version,location,size,which Windows 
Groups/users can access) as well
as any dependencies these binaries may have to report to to Win32 dependency 
manager

When the Windows Installer is out of synch with the installed MS binary as what 
happens when you install a Windows Service Pack your install may only partially 
install leaving the installation in a unusable state where you would then have 
to 
1)clean out the registry for all of the entries for the program (exes) and all 
of its associated dependent dlls
2)delete the installation root folder (and all associated programs)
3)delete any/all links/aliases to those programs

so what started off with a Installer version mismatch can easily turn into 
hours or even a day long task especially with binaries who may drop into 
windows/system32 folder (as is the case when jsvc with msvcrt -this is the MAIN 
runtime library for MS)

In a perfect world where all environments, all resources and all capabilties of 
the operator are known the windows installer works as intended..change any 
version of any characteristic of the above requirements one iota and the 
installer breaks the install..

I vote Postgres sans Windows Installer 
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Fri, 3 Oct 2008 21:25:53 +0200
> From: [EMAIL PROTECTED]
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Standalone Windows Installation
> 
> Thanks for your answer but here's the longer question as asked in the 
> posts before:
> 
> How can I use the official "Postgres without installer" distribution 
> without compiling the sources for myself and without having to install 
> the redistribution application of the VC dlls so that I can distribute 
> an "all-inside" folder with all needed binaries, dlls and so on for all 
> Windows installations? Is it possible perhaps with a manifest file and 
> bundled dlls or is it impossible?
> 
> Jörn
> 
> Joshua Drake schrieb:
> > On Fri, 03 Oct 2008 21:02:27 +0200
> > Jörn Heid <[EMAIL PROTECTED]> wrote:
> >
> >   
> >> So, nobody knows how to make the official "Postgres without
> >> Installer" to work with a normal Windows installation?
> >> 
> >
> > http://www.postgresql.org/docs/faqs.FAQ_MINGW.html
> >
> > Have fun.
> >
> >
> > Joshua D. Drake
> >
> >
> >   
> 
> -- 
> Dipl.-Inform. Med. Jörn Heid
> 
> Zentrum für virtuelle Patienten / Centre for Virtual Patients
> Universitätsklinikum Heidelberg
> Hygiene-Institut
> Im Neuenheimer Feld 324
> 69120 Heidelberg
> 
> Tel.:  +49-(0)7131-504-481
> Fax:   +49-(0)7131-252-470
> 
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

_
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

[GENERAL] ST_Intersects vs. ST_Touches

2008-10-03 Thread cyw
What are the differes between ST_Intersects  and ST_Touches?
The 1st query return something, but the 2nd return 0.

select road.link_id from road where 
Intersects (
 Buffer(GeometryFromText('POINT(-88.02083 41.956982)',4326), .001),
 the_geom
)  

select road.link_id from road where 
Touches (
 Buffer(GeometryFromText('POINT(-88.02083 41.956982)',4326), .001),
 the_geom
)  

Thanks.
_CYW_

Re: [GENERAL] Static functions

2008-10-03 Thread Tom Lane
"Gurjeet Singh" <[EMAIL PROTECTED]> writes:
> Shouldn't PG make all efforts to not execute something when the result is
> already known?

Not if said effort would cost more than is saved, which would be by far
the most likely result if we tried to cache all function results.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Static functions

2008-10-03 Thread Gurjeet Singh
On Sat, Oct 4, 2008 at 8:49 AM, Tom Lane <[EMAIL PROTECTED]> wrote:

> "Gurjeet Singh" <[EMAIL PROTECTED]> writes:
> > Shouldn't PG make all efforts to not execute something when the result is
> > already known?
>
> Not if said effort would cost more than is saved, which would be by far
> the most likely result if we tried to cache all function results.
>

Sorry Tom, I confused STABLE  with IMMUTABLE; my bad.

Joseph, you can cloak the STABLE function inside an IMMUTABLE function, then
this whole thing will be executed only once. Use this advice only after you
understand what you are doing.

Here's an example:

create or replace function f_stable() returns int as $$ begin raise NOTICE
'stable'; return 1; end; $$ stable language plpgsql;

create or replace function f_immutable() returns int as $$ begin raise
NOTICE 'immutable'; perform f_stable(); return 1; end; $$ IMMUTABLE language
plpgsql;

postgres=> select f_stable() from generate_series( 1, 2 );
NOTICE:  stable
NOTICE:  stable
 f_stable
--
1
1
(2 rows)

postgres=> select f_immutable() from generate_series( 1, 2);
NOTICE:  immutable
NOTICE:  stable
CONTEXT:  SQL statement "SELECT  f_stable()"
PL/pgSQL function "f_immutable" line 1 at PERFORM
 f_immutable
-
   1
   1
(2 rows)

postgres=>


You can see that if STABLE function is called directly, it is invoked for
each row; but if we hide the STABLE function inside an IMMUTABLE function,
there is going to be just one invocation of both these functions for the
whole command.

HTH.

Best regards,
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB  http://www.enterprisedb.com

Mail sent from my BlackLaptop device