Re: [GENERAL] thank you

2007-12-19 Thread Shane Ambler
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 18 Dec 2007 19:31:57 -0700 Kevin Kempter [EMAIL PROTECTED] wrote: The point is that I hope you realize just how much you all mean to the community. Kevin I'll second that. Plus thank you for a database system

Re: [GENERAL] thank you

2007-12-19 Thread Dave Page
Joshua D. Drake wrote: On Wed, 19 Dec 2007 12:20:32 +0900 Paul Lambert [EMAIL PROTECTED] wrote: I'm just disappointed that I finish up work with my current employer on Friday and where I am going I won't get to work with PG anymore and thus won't have as much opportunity to interact with

Re: [GENERAL] thank you

2007-12-19 Thread Pedro Doria Meunier
I second that! A BIG THANK YOU for you Postgresql folks out there and since the season is up: Merry Christmas and a Happy New Year! On Tue, 2007-12-18 at 21:26 -0500, Kevin Hunter wrote: Hullo List, This is aimed at everyone in this community who contributes to the Postgres project, but

[GENERAL] to realise the dark side of Microsoft SQL Server...?

2007-12-19 Thread Johan van Zyl
Please elaborate! (Many a true word spoken in jestg) That is until I can convince my new employer to realise the dark side of Microsoft SQL Server. Dave Page wrote: Joshua D. Drake wrote: On Wed, 19 Dec 2007 12:20:32 +0900 Paul Lambert [EMAIL PROTECTED] wrote: I'm just disappointed that

Re: [GENERAL] foreign key constraint, planner ignore index.

2007-12-19 Thread Richard Huxton
Andrew Nesheret wrote: And if i'm execute same statement without access to nodes table planer chose to use index fki_nodes!!! explain analyze SELECT 1 FROM ONLY public.sf_ipv4traffic x WHERE 2003 OPERATOR(pg_catalog.=) node FOR SHARE OF x;

Re: [GENERAL] foreign key constraint, planner ignore index.

2007-12-19 Thread Andrew Nesheret
Richard Huxton wrote: If you PREPARE then EXECUTE the same query, does it still use the index? Done, same result. --- Code --- stmt = connection.prepareStatement( explain analyze SELECT 1 FROM ONLY sf_ipv4traffic x WHERE ? OPERATOR(pg_catalog.=) node FOR SHARE OF x );

[GENERAL] Trouble running PostgreSQL server / Server must be started under certain locale.

2007-12-19 Thread Geoff Ellingwood
I'm in the process of getting Subversion and Trac running on my development machine. So far, the installation process has gone fairly smoothly, until I had to install the Subversion bindings for Python. Because I run Ubuntu, and Ubuntu did not have the latest bindings in its repositories, I had

Re: [GENERAL] foreign key constraint, planner ignore index.

2007-12-19 Thread Richard Huxton
Andrew Nesheret wrote: Richard Huxton wrote: If you PREPARE then EXECUTE the same query, does it still use the index? Done, same result. --- Code --- stmt = connection.prepareStatement( explain analyze SELECT 1 FROM ONLY sf_ipv4traffic x WHERE ? OPERATOR(pg_catalog.=) node FOR

Re: [GENERAL] Trouble running PostgreSQL server / Server must be started under certain locale.

2007-12-19 Thread Richard Huxton
Geoff Ellingwood wrote: I'm in the process of getting Subversion and Trac running on my development machine. So far, the installation process has gone fairly smoothly, until I had to install the Subversion bindings for Python. Because I run Ubuntu, and Ubuntu did not have the latest bindings

[GENERAL] Initdb problem - catch 22?

2007-12-19 Thread Glyn Astill
Hi people, Right I've setup postgres numerous times without a problem, and this time I'm using all the same stuff but running into a problem where initdb won't run without the postgres server running, and the postgres server will not run without the postgresql.conf etc that initdb creates! To

[GENERAL] Initdb problem - catch 22?

2007-12-19 Thread Glyn Astill
Hi people, Right I've setup postgres numerous times without a problem, and this time I'm using all the same stuff but running into a problem where initdb won't run without the postgres server running, and the postgres server will not run without the postgresql.conf etc that initdb creates! To

[GENERAL] Initdb problem - catch 22?

2007-12-19 Thread Glyn Astill
Hi people, Right I've setup postgres numerous times without a problem, and this time I'm using all the same stuff but running into a problem where initdb won't run without the postgres server running, and the postgres server will not run without the postgresql.conf etc that initdb creates! To

Re: [GENERAL] Initdb problem - catch 22?

2007-12-19 Thread Alvaro Herrera
Glyn Astill wrote: Hi people, Right I've setup postgres numerous times without a problem, and this time I'm using all the same stuff but running into a problem where initdb won't run without the postgres server running, and the postgres server will not run without the postgresql.conf etc

Re: [GENERAL] Password as a command line argument to createuser

2007-12-19 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: In your typical shell nowadays the echo command is a built-in one--it executes directly rather than calling a separate echo binary, so it won't leak what you tell it onto a command line. That means this line in a script would be simplest way to do this

[GENERAL] Getting char * from timestamp in a composite type

2007-12-19 Thread Michael Akinde
Hi, I need to extract a text string representation of a timestamp from a user-defined row type; e.g., from the composite type ('1980-01-01 12:00:00', 'Random Comment'), I'd like to extract the C string 1980-01-01 12:00:00 in my user-defined C function. As I understand it, I should be able

Re: [GENERAL] thank you

2007-12-19 Thread Erik Jones
On Dec 19, 2007, at 2:43 AM, Dave Page wrote: Joshua D. Drake wrote: On Wed, 19 Dec 2007 12:20:32 +0900 Paul Lambert [EMAIL PROTECTED] wrote: I'm just disappointed that I finish up work with my current employer on Friday and where I am going I won't get to work with PG anymore and thus

Re: [GENERAL] Getting char * from timestamp in a composite type

2007-12-19 Thread Martijn van Oosterhout
On Wed, Dec 19, 2007 at 04:40:38PM +0100, Michael Akinde wrote: As I understand it, I should be able to do something like (assuming time is the attribute name): bool isNull; HeapTupleHeader t = DatumGetHeapTupleHeader(row); Datum var = GetAttributeByName( row, time, isNull );

[GENERAL] referential integrity and defaults, DB design or trick

2007-12-19 Thread Ivan Sergio Borgonovo
I've something like this: create table i ( iid serial primary key, name varchar(32) ); create table p ( pid serial primary key, iid int references i(iid) on delete cascade, name varchar(32) ); create table c ( bid serial primary key, pid int

Re: [GENERAL] Getting char * from timestamp in a composite type

2007-12-19 Thread Michael Akinde
Martijn van Oosterhout wrote: On Wed, Dec 19, 2007 at 04:40:38PM +0100, Michael Akinde wrote: As I understand it, I should be able to do something like (assuming time is the attribute name): bool isNull; HeapTupleHeader t = DatumGetHeapTupleHeader(row); Datum var =

[GENERAL] Problem with collector statistic

2007-12-19 Thread Marco Aurélio V . da Silva
Dears, Running a query on 2 database-equal, with the same indices, but with slightly different data, I have a very different result of performance. In one the index is used to make the join, in another it is seqscan. The next consultation with explain. Select a.CodPagador,b.Descricao From

Re: [GENERAL] Getting char * from timestamp in a composite type

2007-12-19 Thread Tom Lane
Michael Akinde [EMAIL PROTECTED] writes: bool isNull; HeapTupleHeader t = DatumGetHeapTupleHeader(row); Datum var = GetAttributeByName( row, time, isNull ); // Check for null char * ret = DatumGetCString( DirectFunctionCall1(textout, var ) ); That's not going to work. textout wants a text

Re: [GENERAL] Problem with collector statistic

2007-12-19 Thread Tom Lane
=?iso-8859-1?Q?Marco_Aur=E9lio_V._da_Silva?= [EMAIL PROTECTED] writes: Running a query on 2 database-equal, with the same indices, but with slightly different data, I have a very different result of performance. In one the index is used to make the join, in another it is seqscan. The fact

[GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Sean Z.
Hi, I need your kind advice on postgres deployment strategy. My application is developed on 8.2.4 and need to be deployed to Windows server 2003. Clients may /may not have postgres installed. How can I deploy postgres silently on client machine? Specifically: 1. How to determine if

Re: [GENERAL] Problem with collector statistic

2007-12-19 Thread Gregory Stark
Marco Aurélio V. da Silva [EMAIL PROTECTED] writes: Select a.CodPagador,b.Descricao From Frete01 a Left Outer Join Frete02 b On (a.CodPagador = b.CodCliente) explain in good dabatase: Limit (cost=0.00..46856.62 rows=55204 width=39) (actual time=11.205..536.761 rows=55204 loops=1) That

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Magnus Hagander
Sean Z. wrote: Hi, I need your kind advice on postgres deployment strategy. My application is developed on 8.2.4 and need to be deployed to Windows server 2003. Clients may /may not have postgres installed. How can I deploy postgres silently on client machine? Specifically: 1. How to

[GENERAL] pgpool and slony

2007-12-19 Thread Josh Harrison
Hi, This is a newbie pgpool question. I have 2 servers (master-slave) and Slony is doing the replication. I had installed pgpool for load balance where i had disabled the replication_mode=false and load_balance_mode=true in pgpool.conf pcp_node_info gives this output. -sh-3.00$pcp_node_info 10

Re: [GENERAL] Initdb problem - catch 22?

2007-12-19 Thread Gurjeet Singh
You should run the commands in the following order: initdb pg_ctl -D data_dir -w start # (recommended way of starting the the server) createdb #(optional, since default DB postgres is already there) On Dec 19, 2007 6:17 AM, Glyn Astill [EMAIL PROTECTED] wrote:

Re: [GENERAL] to realise the dark side of Microsoft SQL Server...?

2007-12-19 Thread Geoffrey
Johan van Zyl wrote: Please elaborate! (Many a true word spoken in jestg) That is until I can convince my new employer to realise the dark side of Microsoft SQL Server. It's the product of an evil company? Let's see: 1. they are virtually a monopoly 2. they use their monopoly to tie folks to

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Scott Marlowe
On Dec 19, 2007 11:12 AM, Sean Z. [EMAIL PROTECTED] wrote: Hi, I need your kind advice on postgres deployment strategy. My application is developed on 8.2.4 and need to be deployed to Windows server 2003. Clients may /may not have postgres installed. How can I deploy postgres silently on

Re: [GENERAL] to realise the dark side of Microsoft SQL Server...?

2007-12-19 Thread Joshua D. Drake
Geoffrey wrote: Johan van Zyl wrote: Please elaborate! (Many a true word spoken in jestg) That is until I can convince my new employer to realise the dark side of Microsoft SQL Server. It's the product of an evil company? Let's see: 1. they are virtually a monopoly 2. they use their

Re: [GENERAL] to realise the dark side of Microsoft SQL Server...?

2007-12-19 Thread Geoffrey
Joshua D. Drake wrote: Geoffrey wrote: Johan van Zyl wrote: Please elaborate! (Many a true word spoken in jestg) That is until I can convince my new employer to realise the dark side of Microsoft SQL Server. It's the product of an evil company? Let's see: 1. they are virtually a monopoly

Re: [GENERAL] Killing a session in windows

2007-12-19 Thread Howard Cole
Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: Alvaro Herrera wrote: Huh, why is it awkward? Alternatively, you can send the signal directly using commandkill/ (or commandpg_ctl kill TERM [process id]/). I think we should mention Windows in

Re: [GENERAL] Problem with collector statistic

2007-12-19 Thread Marco Aurélio V . da Silva
Sorry, I discovered that the problem appears to be another, doing tests with the same database, this is a consultation limit using the same database and with 9364 records of the problem, and with 9363 not of. Next bad query with bad results: explain analyse Select a.CodPagador,b.Descricao

Re: [GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-19 Thread Matt Magoffin
But it's true that it's possible for a slow expression to make the recheck very expensive. The planner doesn't have a very good understanding of how to tell whether the expression is likely to be slow. The case I ran into is thing like WHERE x = ANY $1::integer[] which become very slow for

Re: [GENERAL] Problem with collector statistic

2007-12-19 Thread Scott Marlowe
On Dec 19, 2007 2:06 PM, Marco Aurélio V. da Silva [EMAIL PROTECTED] wrote: Sorry, I discovered that the problem appears to be another, doing tests with the same database, this is a consultation limit using the same database and with 9364 records of the problem, and with 9363 not of. Sounds

[GENERAL] postgres UTC different from perl?

2007-12-19 Thread Louis-David Mitterrand
Hi, when trying: psql template1 -c select date_part('epoch',current_date at time zone 'UTC'); date_part 1198015200 the result is different from perl -MDateTime -le 'print DateTime-today(time_zone = UTC)-epoch;' 1198022400 Is there an issue with postgresql?

[GENERAL] Rich LIKE inheritance

2007-12-19 Thread Reg Me Please
Hi all. Is there a way to inherit from a table with the LIKE construct and also get its indexes along with contraints, DEFAULTs and NOT NULLs? An example: CREATE TABLE story_base ( flag BOOL NOT NULL DEFAULT TRUE, starting TIMESTAMP NOT NULL DEFAULT '-INFINITY', ending TIMESTAMP NOT NULL

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Sean Z.
Yes, bolted together application is something I am thinking about. It will satisfied my application's requirement and it won't affect existing applications. So is it possible to install my postgres server (say 8.2.4) regardless of whether there is a postgres server of any version existing on

Re: [GENERAL] postgres UTC different from perl?

2007-12-19 Thread Richard Huxton
Louis-David Mitterrand wrote: Hi, when trying: psql template1 -c select date_part('epoch',current_date at time zone 'UTC'); date_part 1198015200 the result is different from perl -MDateTime -le 'print DateTime-today(time_zone = UTC)-epoch;' 1198022400 Is there an issue

[GENERAL] phpPgAdmin 4.2-Beta-1 translation status

2007-12-19 Thread Robert Treat
Howdy folks, As the current beta of phppgadmin is also a call for translators, I did a quick check to see the current status of the phppgadmin translations. We've had a slew of updates for this release, and with them a large number of new language strings were introduced. According to some

Re: [GENERAL] Rich LIKE inheritance

2007-12-19 Thread Richard Huxton
Reg Me Please wrote: Hi all. Is there a way to inherit from a table with the LIKE construct and also get its indexes along with contraints, DEFAULTs and NOT NULLs? CREATE TABLE ... LIKE isn't inheritance, it's copying the structure. I believe you can duplicate indexes in 8.3. -- Richard

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Scott Marlowe
On Dec 19, 2007 1:55 PM, Sean Z. [EMAIL PROTECTED] wrote: Yes, bolted together application is something I am thinking about. It will satisfied my application's requirement and it won't affect existing applications. So is it possible to install my postgres server (say 8.2.4) regardless of

[GENERAL] INDEX on a composite type

2007-12-19 Thread GMail
Hi all. When trying to create an index on a composite type, I need to enclose the columns in paranthesis. Is this normal? I don't think so as there's no mention in the friendly manual. An example: create type atype as ( atext text, anint int ); create table atable ( info text, compo

Re: [GENERAL] Partitioned tables Slony

2007-12-19 Thread Chris Browne
Goboxe [EMAIL PROTECTED] writes: Thanks Chris. How do I use *.sh *.ik files? The *.sh files are shell scripts that should run with any Bourne shell; the *specific* intent is that they be invoked by the test control script, run_test.sh. The *.ik files are (mostly) bodies of Slonik scripts;

Re: [GENERAL] INDEX on a composite type

2007-12-19 Thread Martijn van Oosterhout
On Wed, Dec 19, 2007 at 10:07:32PM +0100, GMail wrote: Hi all. When trying to create an index on a composite type, I need to enclose the columns in paranthesis. Is this normal? I don't think so as there's no mention in the friendly manual. I beleive it says somewhere that anything except

Re: [GENERAL] INDEX on a composite type

2007-12-19 Thread Colin Wetherbee
GMail wrote: When trying to create an index on a composite type, I need to enclose the columns in paranthesis. Is this normal? I don't think so as there's no mention in the friendly manual. I think your problem is similar to one that has been discussed here previously.

Re: [GENERAL] Trouble running PostgreSQL server / Server must be started under certain locale.

2007-12-19 Thread Geoff Ellingwood
On Dec 19, 2007 7:40 AM, Richard Huxton [EMAIL PROTECTED] wrote: Geoff Ellingwood wrote: Any help would be appreciated; I have quite a bit of data in my 8.1cluster (active phpBB, etc.), and while I could upgrade to 8.2 or even the 8.3beta, I don't know how I would be able to migrate a

Re: [GENERAL] INDEX on a composite type

2007-12-19 Thread GMail
Il Wednesday 19 December 2007 22:29:25 Colin Wetherbee ha scritto: GMail wrote: When trying to create an index on a composite type, I need to enclose the columns in paranthesis. Is this normal? I don't think so as there's no mention in the friendly manual. I think your problem is similar

[GENERAL] Postgres 8.3 HOT and non-persistent xids

2007-12-19 Thread Mike C
Hi, Can someone clarify HOT updates for me (and perhaps put more detail into the docs?). Is this statement correct: the HOT technique is used on *any* table so long as no indexed column is affected. create table T (A int, B int); create index TB on T (B); insert into T (A,B) Values (1,2); So if

Re: [GENERAL] Password as a command line argument to createuser

2007-12-19 Thread Andrew Sullivan
On Wed, Dec 19, 2007 at 10:38:52AM -0500, Tom Lane wrote: reading the password from /dev/tty, so if you want to script this, you'd be stuck with making a special-purpose program that didn't. But given that passwords are sort of awful in this way anyway, why not use something designed not to

Re: [GENERAL] pgpool and slony

2007-12-19 Thread Tom Lane
Josh Harrison [EMAIL PROTECTED] writes: This is a newbie pgpool question. ... sorry if my question is silly It doesn't sound silly, but this isn't the best place to ask it. The slony project has its own mailing list(s) and you'll get better-informed answers there. Not sure if pgpool has its

Re: [GENERAL] postgres UTC different from perl?

2007-12-19 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: I'm not sure that (CURRENT_DATE AT TIME ZONE 'UTC') does what you think it does. Try setting your timezone to various offsets and exploring. In fact, I think it's adjusting in exactly the wrong direction. I get the right number from regression=#

Re: [GENERAL] pgpool and slony

2007-12-19 Thread Tatsuo Ishii
Hi, This is a newbie pgpool question. I have 2 servers (master-slave) and Slony is doing the replication. I had installed pgpool for load balance where i had disabled the replication_mode=false and load_balance_mode=true in pgpool.conf pcp_node_info gives this output.

Re: [GENERAL] pgpool and slony

2007-12-19 Thread Greg Smith
On Wed, 19 Dec 2007, Tom Lane wrote: Not sure if pgpool has its own list. There's a moderately active general user list as part of the set at http://pgfoundry.org/mail/?group_id=155 -- * Greg Smith [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD

Re: [GENERAL] Postgres 8.3 HOT and non-persistent xids

2007-12-19 Thread Pavan Deolasee
On Dec 20, 2007 3:44 AM, Mike C [EMAIL PROTECTED] wrote: Hi, Can someone clarify HOT updates for me (and perhaps put more detail into the docs?). Is this statement correct: the HOT technique is used on *any* table so long as no indexed column is affected. Its partially correct. HOT is used

Re: [GENERAL] Postgres 8.3 HOT and non-persistent xids

2007-12-19 Thread Tom Lane
[ Pavan already answered most of this, but ... ] Mike C [EMAIL PROTECTED] writes: And for non-persistent transaction ids, the documentation says that this is for read-only transactions. What defines a read-only transaction for this purpose? A transaction that has not done anything that

Re: [GENERAL] foreign key constraint, planner ignore index.

2007-12-19 Thread Andrew Nesheret
Richard Huxton wrote: Andrew Nesheret wrote: Richard Huxton wrote: If you PREPARE then EXECUTE the same query, does it still use the index? Tested, comments? --- code - --- result --- Result for node #2007 Index Scan using fki_nodes on sf_ipv4traffic x (cost=0.00..9.65 rows=1

Re: [GENERAL] foreign key constraint, planner ignore index.

2007-12-19 Thread Andrew Nesheret
Forget to add test source code. --- code --- long [] IDs = new long[] { 2007, // no references 156 // all rows in sf_ipv4traffic referenced to }; stmt = connection.prepareStatement(

Re: [GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-19 Thread Tom Lane
Matt Magoffin [EMAIL PROTECTED] writes: I also seemed to notice that after running a query that did return a large number of results where the query plan did use the text[] index, running the same query, or a similar one, would stop using the index lookup and just do a full table scan. Would