Sunday, August 24, 2008

[HACKERS] Extending error-location reports deeper into the system

We currently have the ability to generate error location pointers, such
as

regression=# select nosuchcolumn from int8_tbl;
ERROR: column "nosuchcolumn" does not exist
LINE 1: select nosuchcolumn from int8_tbl;
^

for grammar-detected syntax errors and for errors during first-level
semantic analysis of certain constructs (variables, operators, functions
are about all IIRC). Beyond that, it's not possible because we don't
include location fields in any node types used in post-parse-analysis
query trees.

There was some discussion about this back in March in connection with
a patch proposed by Peter, and in
http://archives.postgresql.org/pgsql-hackers/2008-03/msg00631.php
I wrote

> the current parser location mechanism stores locations only for
> nodes that appear in raw grammar trees (gram.y output), *not* in
> analyzed expressions (transformExpr output). This was an intentional
> choice based on a couple of factors:
>
> * Once we no longer have the parser input string available, the location
> information would be just so much wasted space.
>
> * It would add a weird special case to the equalfuncs.c routines:
> should location fields be compared? (Probably not, but it seems a bit
> unprincipled to ignore them.) And other places might have comparable
> uncertainties what to do with 'em.

It occurred to me today that one of the foundational assumptions of that
old decision has changed, namely that the original query text isn't
available after parsing. We have recently fixed things so that it
almost always *is* available. So I think a reasonable case can be
made for extending most or all querytree node types to include a
location field, and then using these fields in the way sketched in
the above-referenced message to include location pointers in many more
error messages than we do now.

The point about equalfuncs behavior isn't bothering me a lot at the
moment. It seems clear that we *do* want equal() to ignore location
fields, because one of the main purposes it's used for is to note
whether, eg, "ORDER BY x" and "GROUP BY x" are referring to the same
variable, and of course those two occurrences aren't going to have the
same syntactic position.

Another interesting point is outfuncs/readfuncs behavior. I think that
we'd want outfuncs to print the location fields, because they're
possibly useful for debugging; but readfuncs should ignore the data and
set the fields to -1 (unknown) when reading nodes back in. The reason
for this is that the only application for reading nodes in is sucking in
stored rules, default expressions, etc. And these are exactly the cases
where we indeed no longer have the original source text handy. If we
didn't set the locations to unknown, then errors complaining about
problems arising within a rule would try to print pointers to locations
in the calling query's text having the same offsets as the problematic
item had in the original CREATE RULE or similar command. Not what we
want.

There is going to be some small distributed overhead from adding an
additional integer field to so many common Node types, but I find it
hard to believe that it'd be measurable.

So this all seems doable and probably not a very large task to get the
infrastructure in place, though of course actually extending many error
messages to include location pointers will probably happen piecemeal
over time.

Thoughts, objections? If there are none I'm tempted to work on this
in the week remaining before September commitfest.

regards, tom lane

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

Re: [ADMIN] restoring from dump

Hi Jeff,

Quagmire deepens, it seems...

I tried:
  dropdb <myDB>
and it told me:
  dropdb: database removal failed: ERROR:  could not access status of transaction 139602298
  DETAIL:  Could not open file "pg_clog/0085": No such file or directory.

I went into pg_clog directory and issued:
  ls -lt | head
and it told me:
  -rw-------   1 postgres postgres 163840 Aug 24 09:57 0088
  drwx------  11 postgres postgres   4096 Aug 22 13:56 ..
  drwx------   2 postgres postgres   4096 Jun 30 16:03 .
  -rw-------   1 postgres postgres 262144 Jun  1 20:04 0084
  -rw-------   1 postgres postgres 262144 Apr  4 15:48 0083
  -rw-------   1 postgres postgres 262144 Mar 26 18:25 0082
  -rw-------   1 postgres postgres 262144 Mar 26 01:28 0081
  -rw-------   1 postgres postgres 262144 Mar 25 23:05 0080
  -rw-------   1 postgres postgres 262144 Mar 25 20:39 007F

It seems that 0088 was generated at the time very close to
my issuing dropdb.

What are my options now?

Thank you.

Tena Sakai
tsakai@gallo.ucsf.edu



-----Original Message-----
From: Jeff Frost [mailto:jeff@frostconsultingllc.com]
Sent: Sat 8/23/2008 10:29 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: RE: [ADMIN] restoring from dump

On Sat, 23 Aug 2008, Tena Sakai wrote:

> Hi,
>
> At psql prompt, I tried:
>  drop database myDB;
> and it told me:
>  ERROR:  cannot drop the currently open database
>
> Does this mean I have to issue
>  pg_ctl stop
> before I issue
>  "drop database myDB;"?
> But if I do so, then how would I get to psql prompt
> at all?
>
> How would I get around this catch-22 situation?
> Any advice appreciated.

Just connect to a different database to do your drop.  This is what the
'postgres' database is often used for.  That's why it is sometimes referred to
as the maintenance DB.

Or you can use the dropdb command.  Of course I'd still recommend you rename
the DB till you're sure the restore was successful.


>
> Tena Sakai
> tsakai@gallo.ucsf.edu
>
> -----Original Message-----
> From: Jeff Frost [mailto:jeff@frostconsultingllc.com]
> Sent: Fri 8/22/2008 10:28 PM
> To: Tena Sakai
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] restoring from dump
>
>
>
> Jeff Frost wrote:
>> Tena Sakai wrote:
>>>
>>>> If you want to restore all the databases that were in this
>>>> postgresql installation at the time of the backup, then the
>>>> best thing to do is drop all those DBs before attempting the
>>>> restore.
>>> Yes, the database in question is built and updated continuously
>>> from a several sources.  There was a massive power failure,
>>> a series of them, and things got to be a very inconsistent
>>> state and therefore we need to go back to a reliable, trustworthy
>>> backup and then rebuild from there.
>>>
>>> What I gather, from your comments, all I have to do would to issue
>>> a psql command:
>>>   drop database <dbname>
>>> then repeat what I did from shell prompt, ie.,
>>>   zcat <compressed_file> | psql postgres > restore.out 2 > restore.err
>>>
>>> Would you mind confirming if I am understanding you correctly?
>>>
>> Yes, based on the information you've given us, you should be able to
>> restore the entire database (and any other databases that were in the
>> cluster) by first dropping those databases and then issuing the above
>> command.
>>
>> BTW, if you find yourself with an older version of postgresql, this
>> could be a good opportunity to upgrade.  I'm not sure if you mentioned
>> what version you were using in your original post.
> I should also note that you could rename the database instead of
> dropping it outright, to make sure your restore is effective before
> dropping it.
>
>

--
Jeff Frost, Owner       <jeff@frostconsultingllc.com>
Frost Consulting, LLC   http://www.frostconsultingllc.com/
Phone: 916-647-6411     FAX: 916-405-4032

Re: [BUGS] Postgresql v8.3.3 + Perl v5.10

Eugen.Konkov@aldec.com escribió:
> Yes, I am ActivePerl and Win32 Binary PG
> Is it scheduled to fix?

Not yet. As stated, you need to use a supported version of Perl.

On the other hand, you can probably compile Postgres on Windows yourself
to get Perl 5.10 support.

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

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

[pgsql-es-ayuda] Error en instalación 8.3

Saludos a la lista.

Desde hace algún tiempo tenía instalado PostgreSQL 8.2.0 en un Windows Server 2003 R2 SP2, para correr sobre él un ERP que estoy testeando. Para probar si este software aceptaba también correr sobre 8.3, he procedido a desinstalar en el entorno de pruebas e instalar de nuevo.

En resumen, el problema con el que he topado es el siguiente:  Se lanza la instalación desde desde una sesión de usuario con derechos totales (Administrador). Cuando se está completando la instalación e intenta iniciar la BD, la operación se aborta ("Rolling back action") y se cancela la copia de archivos y el resto de configuraciones; finalmente aparece este mensaje de "FatalError": "Installation ended prematurely because of an error". Sólo permanece el usuario del sistema creado para la instalación.
Lo he intentando con las tres versiones de la serie (8.3.0, 8.3.1 y 8.3.3) con el mismo resultado. Para descartar cualquier interferencia de instalaciones anteriores he formateado y reinstalado el equipo desde cero, pero el error se repite.
Al final, he conseguido instalar sin problemas la versión 8.2.9.
Este error se repite también en el proceso de instalación en otro equipo con Windows XP SP2.

Buscando información en los mensajes de la lista, he encontrado que el problema ya se citaba en los posts siguientes y que se quedaron sin solución:

http://archives.postgresql.org/pgsql-es-ayuda/2008-02/msg00524.php
http://archives.postgresql.org/pgsql-es-ayuda/2008-03/msg00363.php
http://archives.postgresql.org/pgsql-es-ayuda/2008-03/msg00482.php
http://archives.postgresql.org/pgsql-es-ayuda/2008-06/msg00310.php

Agradeceré cualquier información sobre el tema.
Saludos.

José Antonio Pons



Textos de los dos avisos de error que aparecen en el visor de sucesos:

Tipo de suceso: Información
Origen del suceso:      MsiInstaller
Categoría del suceso:   Ninguno
Id. suceso:     11708
Fecha:          21/08/2008
Hora:           18:14:05
Usuario:                NET001P01\Administrador
Equipo: NET001P01
Descripción:
Product: PostgreSQL 8.3 -- Installation failed.
Datos:
0000: 7b 42 38 32 33 36 33 32   {B823632
0008: 46 2d 33 42 37 32 2d 34   F-3B72-4
0010: 35 31 34 2d 38 38 36 31   514-8861
0018: 2d 42 39 36 31 43 45 32   -B961CE2
0020: 36 33 32 32 34 7d         63224}

Tipo de suceso: Información
Origen del suceso:      MsiInstaller
Categoría del suceso:   Ninguno
Id. suceso:     11708
Fecha:          21/08/2008
Hora:           18:11:42
Usuario:                NET001P01\Administrador
Equipo: NET001P01
Descripción:
Product: PostgreSQL MUI Wrapper 8.3 -- Installation failed.
Datos:
0000: 7b 34 41 46 46 42 39 46   {4AFFB9F
0008: 38 2d 41 30 37 31 2d 34   8-A071-4
0010: 35 44 45 2d 42 36 35 39   5DE-B659
0018: 2d 36 45 32 45 34 44 45   -6E2E4DE
0020: 32 42 41 42 44 7d         2BABD}

[HACKERS] xml plans for postgres?

Recently Postgres has added a data type 'xml' which allows for
a well formed document to be inserted as a column in a Postgres database.
At the moment it doesnot have much utility, you can *almost* get the
same thing done with a text column. It's obviously the first step.

Is there a document that describes the direction Postgres
will take relative to xml technology? XQuery, XUpdate and XSLT
are very different approaches that could compliment or severely disrupt
Postgres' evolution.

I personally am very excited about the potential but I'd like to get
the pulse of the community.

Thank you,

-g

--
Greg Fausak
greg@thursday.com

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

Re: [HACKERS] What in the world is happening on spoonbill?

Steven Lembark <lembark@wrkhors.com> writes:
>>> Are we in the business of excluding text-based browsers? Or obsolete
>>> ones, for that matter?

> I don't think we would want to be in the business of
> dealing successfully with every quirk of every browser
> ever released.

That's nothing but a straw-man. The point here was to avoid using
constructs that we know won't work on some set of browsers, not to
specifically code around any "quirks". I already suggested a workable
solution that involves no new assumptions at all, which was to put the
added info on the linked-to pages instead of directly on the dashboard.

Now we could do that *and* use tooltips, if we can be fairly sure that
the tooltips will be ignored by browsers that can't handle them as
popups.

regards, tom lane

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

Re: [BUGS] BUG #4274: uuid returns duplicate values

"Harald Armin Massa" <haraldarminmassa@gmail.com> writes:
>> I wouldn't trust "old fashioned uuids" anymore.

> BTW: Windows has an integrated GUID creator. Used for a lot of things.
> Used in all windows installations. THAT one should be fairly robust,
> shouldn't it?

[ you just made me spill coffee all over my keyboard... ] It's never
a good idea to use "Windows" and "robust" in the same sentence.

Try googling for "windows duplicate guids" and similar phrases.
I get 226000 hits on that one.

regards, tom lane

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

Re: [HACKERS] proposal sql: labeled function params

"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> 2008/8/23 Hannu Krosing <hannu@2ndquadrant.com>:
>> Why not just use some standard record syntax, like

> do you thing, so is it simpler?

It's not about being "simpler", it's about pointing out that there are
ways to do what you need without creating compatibility problems and
without commandeering syntax that, if we were going to commandeer it,
would be far better used for named params.

IMHO, the use-case for labeled parameters is simply much too narrow
to justify giving them special syntax if there is any possible way
to avoid it. We have now seen a couple of ways to do it without
new syntax, at the cost of a few more lines inside the called function
to examine its arguments. But the use-cases you've suggested involve
functions that are complicated enough that that's not going to be any
big deal.

So I feel that the proposal for labeled parameters as such is dead
in the water, and that the only usefulness this thread has had is
(re-) exploring the syntactic alternatives available for named params.

regards, tom lane

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

Re: [HACKERS] [PATCHES] VACUUM Improvements - WIP Patch

Merlin Moncure wrote:
> On Fri, Aug 22, 2008 at 11:36 PM, Bruce Momjian <bruce@momjian.us> wrote:
>> I assume there is no TODO here.
>
> Well, there doesn't seem to be a TODO for partial/restartable vacuums,
> which were mentioned upthread. This is a really desirable feature for
> big databases and removes one of the reasons to partition large
> tables.

I would agree that partial vacuums would be very useful.

Joshua D. Drake

>
> merlin
>


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

Re: [HACKERS] What in the world is happening on spoonbill?

Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
>> Tom Lane wrote:
>>> I'm not sure all browsing setups support tooltips nicely.
>
>> Any half way modern browser that is not text based should support tool tips.
>
> Are we in the business of excluding text-based browsers? Or obsolete
> ones, for that matter?

Shrug, I was just offering that most browsers should support it.


Joshua D. Drake


>
> regards, tom lane
>


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

Re: [pgsql-de-allgemein] Funktion: Ergebnis kommagetrennt

Hi,

versuchs mal mit
select array_to_string(ARRAY(select email from turba_objects),',')

Thomas


Andreas Moroder schrieb:
> Hallo,
>
> ich habe eine Abfrage
>
> select email from turba_objects.
>
> Ich bräuchte eine PL/pgSQL function welche diese Abfrage ausführt und ein String mit allen durch Komma getrennten Mailadressen zurückgibt z.B ( abc@test.com, xyz@probe.com usw )
> Nach dem letzten Eintrag darf kein Beistrich vorkommen.
>
> Kann mir jeman dabei helfen ?
>
> Vielen Dank
> Andreas Moroder
>
>


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

[pgsql-de-allgemein] Funktion: Ergebnis kommagetrennt

Hallo,

ich habe eine Abfrage

select email from turba_objects.

Ich bräuchte eine PL/pgSQL function welche diese Abfrage ausführt und ein String mit allen durch Komma getrennten Mailadressen zurückgibt z.B ( abc@test.com, xyz@probe.com usw )
Nach dem letzten Eintrag darf kein Beistrich vorkommen.

Kann mir jeman dabei helfen ?

Vielen Dank
Andreas Moroder

--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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

Re: [BUGS] Installation Problems

Bernard Stewe napsal(a):
> Hi
>
> We are trying to install postgres 8.3.0 on solaris 9.
>
> The installation process comes up with the following error.

Hi,

Please, could you specify what binary do you use? It seems to me that you
downloaded PG version which is compiled for Solaris 10 Update 4.

Zdenek

--
Zdenek Kotala Sun Microsystems
Prague, Czech Republic http://sun.com/postgresql


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

Re: [HACKERS] What in the world is happening on spoonbill?

>> Are we in the business of excluding text-based browsers? Or obsolete
>> ones, for that matter?

I don't think we would want to be in the business of
dealing successfully with every quirk of every browser
ever released.

Another way to look at it is supporting standards:
If graphical browsers support at least HTML and CSS,
maybe ecmascript, then they are supportable. If text
based ones can handle the necessary alt tags then we
can also support them.

Beyond that, do you really want to document and code
around every quirk in MSIE 1.0, Netscape 0.50, or any
of the now-extinct text-based browsers for MSDOS?

--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508

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

Re: [PERFORM] Large number of tables slow insert

Does all INSERTs are made by one application? Maybe PREPARED STATEMENTS
will help you? What about optimization on application level?

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

Re: [PERFORM] Large number of tables slow insert

hello to all,

I've a question regarding the folowing comments.

How to estimate vacuum aggressiveness ?

It's for me very deficulte to setup the autovaccum setting correctly. It
seems for me that it is not enough aggressive, but when I change the
settings the autovacuum process is almost always running.

So how to setup it, for around 40000 insert, update, delete per 5 minutes

regards

david
Scott Marlowe a écrit :
> On Sat, Aug 23, 2008 at 6:59 PM, Loic Petit <tls.wydd@free.fr> wrote:
>
>> 1 table contains about 5 indexes : timestamp, one for each sensor type - 3,
>> and one for packet counting (measures packet dropping)
>> (I reckon that this is quite heavy, but a least the timestamp and the values
>> are really usefull)
>>
>
> But what's the update rate on these indexes and tables? I'm wondering
> if you're not vacuuming aggresively enough to keep up with bursty
> update patterns
>
>


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

Re: [HACKERS] Proposal: new border setting in psql

On Sun, 24 Aug 2008 09:16:43 -0400
"Merlin Moncure" <mmoncure@gmail.com> wrote:
> Personally I think it's rather nice to be able to have some extra
> flexibility in how psql prints out data. Maybe, instead of the dry
> and uninformative 'border 2', there could be a set of ouput control
> options. Maybe I want the text aligned but with no border for
> example.

You mean like "\pset border 0" does?

Personally I would love to see user defined display outputs for full
flexibility. Since we already have XML I would suggest using that as a
base and allow filters to process it before output.

That's a much larger job though.

--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

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

Re: [HACKERS] [PATCHES] VACUUM Improvements - WIP Patch

On Fri, Aug 22, 2008 at 11:36 PM, Bruce Momjian <bruce@momjian.us> wrote:
>
> I assume there is no TODO here.

Well, there doesn't seem to be a TODO for partial/restartable vacuums,
which were mentioned upthread. This is a really desirable feature for
big databases and removes one of the reasons to partition large
tables.

merlin

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

Re: [HACKERS] Proposal: new border setting in psql

On Sun, Aug 24, 2008 at 2:00 AM, D'Arcy J.M. Cain <darcy@druid.net> wrote:
> On Sat, 23 Aug 2008 14:57:50 -0400
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Also, having now looked at the proposed patch, it seems clear that it
>> isn't addressing the issue of quoting/escaping at all; so I wonder how
>> this can be considered to be a safely machine-readable format.
>
> It's not a machine readable format. It is a simple display with more
> border lines. Just like "border 2" is like "border 1" with more border
> lines. I'm just following the progression.


Personally I think it's rather nice to be able to have some extra
flexibility in how psql prints out data. Maybe, instead of the dry
and uninformative 'border 2', there could be a set of ouput control
options. Maybe I want the text aligned but with no border for
example.

merlin

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

Re: [GENERAL] SERIAL datatype

On Aug 21, 2008, at 9:51 PM, Peter Billen wrote:

> My concern is not that the table will become full, but that the
> sequence will be exhausted. Doing INSERT, DELETE, INSERT,
> DELETE ... will exhaust the sequence. What will happen then? Do I
> have to manually re-order my serial values and reset the start
> sequence ID to MAX() + 1?

DELETEs don't use your sequence so will not exhaust it. In practice
only INSERTs do. I saw you mention sequences in combination with
DELETEs a few times, just making sure you're not confused ;)

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,48b14c10243481755132881!

--
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] on delete cascade slowing down delete

On Aug 22, 2008, at 9:45 AM, Ivan Sergio Borgonovo wrote:

> On Fri, 22 Aug 2008 08:48:30 +0200
> Alban Hertroys <dalroi@solfertje.student.utwente.nl> wrote:
>
>>
>>> Is it going to make things faster if I:
>>>
>>> delete from s;
>>> reindex table s;
>
>> Why do you think this step would help you any? There's no index on
>> p to begin with. You'd just be reindexing the auto-generated
>> unique index on s (due to it being a PK).
>
> Sorry I forgot to add the index in the example.
> What if there was an index in s.pid too?
> But mostly... if I delete s will the deletion of p be faster?

Hard to tell without the results from explain analyse. It depends on
what the planner decides to do, but it's often faster than the things
we come up with to work around the planner. As a rule of thumb, if
you're trying to work around the planner it is likely your problem is
caused by something else.

Without an explain plan everything is just speculation really, the
planner is quite smart and it knows your data. It tends to outsmart
the devs.

>>> delete from p;
>
>> And no, this would most likely be slower.
>
> Why?

Because of the extra reindex step. If you'd replace that with an
analyse of p, then it may be faster. Or it may not.

You seem to misinterpret the use case for REINDEX. Read here:
http://www.postgresql.org/docs/8.3/interactive/sql-reindex.html

Especially note the usage scenarios ;)

> Stopping a
> delete from p;
> I can see that actually postgresql is also executing a
> delete from s where pid=$1;
> if s is already empty, and there are no other cascading delete on s,
> the lookup should be faster. I was wondering if that doesn't make a
> difference in terms of performance if
> a) I've an index on pid on both tables
> or
> b) s is already empty
>
> and... should I reindex s if I "delete from s" first if I want some
> speed up on delete from p;
>
> Anyway this looks more and more a dead end once things get more and
> more complicated since it requires too much bookkeeping.

Maybe you shouldn't try to speculate on solutions before you
ascertained what the problem is? People asked for an EXPLAIN ANALYSE,
we can't really help you without that.
With it we can probably exactly tell you what's causing your problem,
if we still need to once you see the results.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,48b147ea243482493511527!

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

Saturday, August 23, 2008

Re: [pgsql-advocacy] Booth swag for the absentee enthusiast

Josh Berkus wrote:
> Josh,
>
>> PgUS will have a store, I assume PgEU will as well but I can not speak
>> for them.
>
> You need to talk to your tax accountant about this then. There are special
> rules around 501(c)3s selling things.

Already have :)

Joshua D. Drake

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

[COMMITTERS] pgsql: Add missing descriptions for aggregates, functions and

Log Message:
-----------
Add missing descriptions for aggregates, functions and conversions.

Bernd Helmle

Modified Files:
--------------
pgsql/src/backend/utils/mb/conversion_procs:
Makefile (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/Makefile?r1=1.19&r2=1.20)
pgsql/src/include/catalog:
catversion.h (r1.478 -> r1.479)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.478&r2=1.479)
pg_proc.h (r1.510 -> r1.511)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.510&r2=1.511)

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

Re: [PATCHES] Add missing descriptions for aggregates, functions and conversions

Patch applied; always nice to beef up our descriptions, thanks.

---------------------------------------------------------------------------

Bernd Helmle wrote:
>
> Please find attached a patch that adds some missing descriptions for
> aggregates, functions and conversions. This will add COMMENTs to the
> conversion sql script as well. Most of the descriptions are taken from the
> documentation (especially for the statistic functions). I didn't bother
> with some internal functions like text_pattern_lt, if we agree they should
> be described as well i can add them, too.
>
> --
> Thanks
>
> Bernd
[ Attachment, skipping... ]

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

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [HACKERS] [GENERAL] Surprising syntax error

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
> > with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?
>
> GRANT/REVOKE behavior is specified by the standard, whereas the stuff
> we allow under ALTER VIEW is all an extension to the standard --- not
> merely syntax-wise, but functionality.
>
> A concrete reason not to do it is that if someone writes GRANT ON VIEW,
> their code won't port to other DBs that are following the spec, and
> it'll be only because we allowed non-spec syntactic sugar, not because
> they're using functionality not covered by the spec.
>
> We routinely complain about mysql inventing nonstandard ways to express
> things that have perfectly good spec-compliant equivalents. How would
> this be different?

OK, so this is a standards issue, then, OK, makes sense.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [GENERAL] psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully

On Sat, 23 Aug 2008 11:41:41 -0600
"Scott Marlowe" <scott.marlowe@gmail.com> wrote:

> On Sat, Aug 23, 2008 at 10:28 AM, Ivan Sergio Borgonovo
> <mail@webthatworks.it> wrote:
> > On Fri, 22 Aug 2008 18:34:53 -0600
> > "Scott Marlowe" <scott.marlowe@gmail.com> wrote:
> >
> >> Glad you got your problem resolved. I have to admit I tend to
> >> mostly use psql to interact with postgres. Nothing against
> >> PGAdmin III, it's good software. I just tend to feel more comfy
> >> scripting things than clicking things. Whether you're using
> >> pgadmin III or psql, it's important that you have the right
> >> version. For pgadmin it's usually best to always have the
> >> latest version, and with psql the one that matches your db.
> >
> > Is there any secret I don't know?
> > I mostly use pgadmin because:
> > 1) It is easier to cut and paste code and results
>
> I use /i /o a lot. poor man's cut and paste / multi-file buffer.
> also highlight / middle button click.

I just forgot that vim is vim:

http://www.vim.org/scripts/script.php?script_id=356

Object Completion
----------------------------
dbext ties into Vim dictionary feature. You can complete table
names, procedure names and view names using the i_CTRL-X_CTRL-K
feature.

Viewing Lists of Objects
------------------------------------
You can browse through the various objects in the database you are
connected to and specify wildcard information. For example you can
say, "Show me all tables beginning with 'ml_' ". These objects are
currently supported: Tables, Procedures, Views, Columns (for a
table).

Trying to make it work.


--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Re: [HACKERS] [GENERAL] Surprising syntax error

Bruce Momjian <bruce@momjian.us> writes:
> Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
> with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?

GRANT/REVOKE behavior is specified by the standard, whereas the stuff
we allow under ALTER VIEW is all an extension to the standard --- not
merely syntax-wise, but functionality.

A concrete reason not to do it is that if someone writes GRANT ON VIEW,
their code won't port to other DBs that are following the spec, and
it'll be only because we allowed non-spec syntactic sugar, not because
they're using functionality not covered by the spec.

We routinely complain about mysql inventing nonstandard ways to express
things that have perfectly good spec-compliant equivalents. How would
this be different?

regards, tom lane

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

Re: [HACKERS] proposal sql: labeled function params

On Sat, 2008-08-23 at 08:21 +0200, Pavel Stehule wrote:
> Hello
>
> 2008/8/22 Hannu Krosing <hannu@2ndquadrant.com>:
> > On Thu, 2008-08-21 at 23:41 -0500, Decibel! wrote:
> >> On Aug 20, 2008, at 8:26 AM, Pavel Stehule wrote:
> >
> >> How about we poll -general and see what people say? I'll bet Tom a
> >> beer that no one replies saying they've created a => operator (unless
> >> maybe PostGIS uses it).
> >
> > Does Oracle use => for "labeled function params" or just named
> > arguments ?
> >
>
> Oracle use it for named arguments - what I know, similar it doesn't
> allow functionality as labeled params publicly - SQL/XML use it.
>
> >> If we're really worried about it we can have a GUC for a few versions
> >> that turns off named parameter assignment. But I don't think we
> >> should compromise the design on the theory that some folks might be
> >> using that as an operator *and* can't change their application to
> >> wrap it's use in ().
> >
> > I still think that better approach is allowing RECORD as input type and
> > do all the things Pavel proposed with a function that iterates over
> > record.
> >
>
> record or hash table - it's implementation - second step. We have to
> find syntax and semantic now.

Why not just use some standard record syntax, like

SELECT(value::type name, ...)

or perhaps some extended ROW() or VALUES() syntax ?

Like this :
SELECT * FROM FUNC(SELECT(value::type name, ...) AS r);

-----------------
Hannu

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

Re: [HACKERS] What in the world is happening on spoonbill?

Stefan Kaltenbrunner wrote:
> Tom Lane wrote:

>> Can you modify the buildfarm's description of that machine to mention
>> the special malloc debug flags? It'd probably stop me from asking
>> you this question again ;-)
>
> hmm - would take somebody with SQL-level access to do this - the script
> to update OS/compiler related data is only partially(ie not updating all
> information) working...

I've changed the compiler to read gcc-malloc-FGJPZ on spoonbill.

BTW this animal has not updated in quite a few days ... is this
expected?

> But maybe it would be nice to have some sort of "notes about this
> buildfarm member" text field that contains this information (or other
> stuff like "this is a VM running on bar" or "this is really the same
> hardware as animal bar just with configuration baz" ?

Apparently Andrew has been working on it, but it's not yet visible on
the web page anywhere.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Re: [HACKERS] [GENERAL] Surprising syntax error

Robert Haas wrote:
> >> While we don't _need_ it, it would make our system more consistent; we
> >> have made similar changes for views in other areas.
> >
> > I'm not sure it'd make the system more consistent. Because the SQL
> > standard says you use GRANT ON TABLE for a view. we'd have to always
> > ensure that we accepted that; whereas in at least some other places
> > we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> > the object type.
> >
> > Given the spec precedent, I'm inclined to leave it alone. It's not like
> > there aren't plenty of other SQL quirks that surprise novices.
>
> I fail to understand why it's advantageous to artificially create
> surprising behavior. There are cases where PostgreSQL now accepts
> either ALTER VIEW or ALTER TABLE where it previously accepted only the
> latter, so the situation is hardly without precedent. I find it
> exceedingly unlikely that anyone is relying on GRANT ON VIEW to NOT
> work.

Yes, I assumed we were following the recent work on ALTER TABLE/VIEW
with GRANT/REVOKE. Peter, Tom, how is GRANT/REVOKE different?

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [PERFORM] Large number of tables slow insert

Actually, I've got another test system with only few sensors (thus few tables)
and it's working well (<10ms insert) with all the indexes.
I know it's slowing down my performance but I need them to interogate the big
tables (each one can reach millions rows with time) really fast.

> Each INDEX create a delay on INSERT. Try to measure performance w/o any
> indexes.
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

Regards

Loïc

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

Re: [HACKERS] proposal sql: labeled function params

> So for a bit of useless syntactic sugar we should introduce conflicts with
> named parameters, conflicts with operators, introduce an un-sqlish syntax and
> remove a feature users have already made use of and introduce backwards
> compatibility issues for those users?
>
we talk only about "=>" symbol. What I googled, I never to find any
database that use AS for named params, and I don't really to create
next proprietary syntax (I would not to wait to ANSI). AS is usable,
but I don't think so it is good idea - it change sense of AS keyword
in SQL.

Oracle: fce (param => expr)
MSSQL: fce @param = expr
Firebird 2.0 allows defaults, but doesn't support named params


> At any point in this discussion has anyone explained why these labels would
> actually be a good idea?
>

it's allows smart libraries like SQL/XML
regards
Pavel Stehule

> --
> Gregory Stark
> EnterpriseDB http://www.enterprisedb.com
> Ask me about EnterpriseDB's 24x7 Postgres support!
>

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

Re: [HACKERS] [GENERAL] Surprising syntax error

>> While we don't _need_ it, it would make our system more consistent; we
>> have made similar changes for views in other areas.
>
> I'm not sure it'd make the system more consistent. Because the SQL
> standard says you use GRANT ON TABLE for a view. we'd have to always
> ensure that we accepted that; whereas in at least some other places
> we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> the object type.
>
> Given the spec precedent, I'm inclined to leave it alone. It's not like
> there aren't plenty of other SQL quirks that surprise novices.

I fail to understand why it's advantageous to artificially create
surprising behavior. There are cases where PostgreSQL now accepts
either ALTER VIEW or ALTER TABLE where it previously accepted only the
latter, so the situation is hardly without precedent. I find it
exceedingly unlikely that anyone is relying on GRANT ON VIEW to NOT
work.

...Robert

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

Re: [HACKERS] proposal sql: labeled function params

2008/8/23 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> I thing, so it's possible - in this case. We should transform named
>> params to expr after syntax analyze.
>
> You're going to have a hard time making parentheses affect the behavior
> if you do it that way.
>
> regards, tom lane
>

I don't prefer this way
regards
Pavel Stehule

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

Re: [pgsql-advocacy] Booth swag for the absentee enthusiast

Josh,

> PgUS will have a store, I assume PgEU will as well but I can not speak
> for them.

You need to talk to your tax accountant about this then. There are special
rules around 501(c)3s selling things.

--
Josh Berkus
PostgreSQL
San Francisco

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

Re: [HACKERS] Proposal: new border setting in psql

Andrew Dunstan <andrew@dunslane.net> writes:
> I think we should probably confine ourselves to output formats that are
> in very wide use or we'll be supporting a vast multitude. CSV and XML
> both qualify here - not sure that ReST does.

Yeah, that's the core of my objection.

Also, having now looked at the proposed patch, it seems clear that it
isn't addressing the issue of quoting/escaping at all; so I wonder how
this can be considered to be a safely machine-readable format.
In particular, the output seems to me to not even approximate the rules
laid down at
http://docutils.sourceforge.net/docs/user/rst/quickref.html
which among other things requires backslashing of literal asterisk,
backquote, vertical bar, and underscore in order to avoid textual data
looking like it matches the format's inline-markup constructs.

So, quite aside from the question of whether we care to support ReST,
my opinion is that this patch fails to do so, and a significantly more
invasive patch would be needed to do it.

regards, tom lane

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

Re: [HACKERS] [GENERAL] Surprising syntax error

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Peter Eisentraut wrote:
> >> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> >>> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
> >>
> >> The SQL standard doesn't specify it. And there is no need for it.
>
> > While we don't _need_ it, it would make our system more consistent; we
> > have made similar changes for views in other areas.
>
> I'm not sure it'd make the system more consistent. Because the SQL
> standard says you use GRANT ON TABLE for a view. we'd have to always
> ensure that we accepted that; whereas in at least some other places
> we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
> the object type.
>
> Given the spec precedent, I'm inclined to leave it alone. It's not like
> there aren't plenty of other SQL quirks that surprise novices.

OK, removed from TODO.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [pgsql-www] request for sponsors page

On Thu, Aug 21, 2008 at 01:32:05PM -0700, Josh Berkus wrote:
> Dave,
>
> > > Really? I can't think of many people who would care that much -
> > > and even if they did, simply listing names and amounts for small
> > > donors would be similarly trivial to do.
>
> A few people care, and why not get those people's donations as well?
> Screen real estate is cheap, except on the home page. And it makes
> people feel good about donating, even when it doesn't increase
> giving.
>
> All I'm talking about is having a list of donors within a few broad
> categories.
>
> > I think Josh is using his overly pessimistic view here. We are an
> > software project not a global corporation selling something.
>
> Huh? What does that have to do with anything?
>
> Donor listings are a proven way to improve donor relations
> throughout non-profits worldwide.

Not just non-profits, either. We're a social species, and we're
motivated at a powerful, primitive level by messages to the effect of,
"lots of others like you are doing this."

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Re: [GENERAL] psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully

On Sat, Aug 23, 2008 at 10:28 AM, Ivan Sergio Borgonovo
<mail@webthatworks.it> wrote:
> On Fri, 22 Aug 2008 18:34:53 -0600
> "Scott Marlowe" <scott.marlowe@gmail.com> wrote:
>
>> Glad you got your problem resolved. I have to admit I tend to
>> mostly use psql to interact with postgres. Nothing against
>> PGAdmin III, it's good software. I just tend to feel more comfy
>> scripting things than clicking things. Whether you're using
>> pgadmin III or psql, it's important that you have the right
>> version. For pgadmin it's usually best to always have the latest
>> version, and with psql the one that matches your db.
>
> Is there any secret I don't know?
> I mostly use pgadmin because:
> 1) It is easier to cut and paste code and results

I use /i /o a lot. poor man's cut and paste / multi-file buffer.
also highlight / middle button click.

> 2) It's easier to open several connections

I just use multiple term windows

> 3) you've the object structure to navigate

that's the main reason I'd find myself using it.

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

Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi Eric-san.

Thank you for an early check. !
I understand that many users think are same with you.
more gratitude:-)

Regards,
Hiroshi Saito

----- Original Message -----
From: "Eric P. Melbardis" <eric.melbardis@netkitsolutions.com>


Hi

Testing on my home system, looking good... will try on my office system Monday.

Note:
I am assuming that the uuid will mostly be used as a primary key on records that
will exist in replicated databases to guarantee uniqueness. The problem that is see with the
current uuid functions for this purpose is that the generated uuid is very random causing
great performance issues with the index; at least when using oracle and ms sql server, did
not try with postgres, but must be similar. Usually inserting random data into an index of
any kind is a worst case stress test. Hence the older style of uuid, based on mac addresses
and time tend to generate more sequential uuid's, at least when inserting a bunch of records
at once.

In other words it would be nice to have the old fashioned style of uuid's.

Regards

Eric


-----Original Message-----
From: Hiroshi Saito [mailto:z-saito@guitar.ocn.ne.jp]
Sent: Saturday, August 23, 2008 8:26 AM
To: Eric P. Melbardis; Bruce Momjian
Cc: Nicolas ANTONINI; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi Eric-san.

Done! please check it.
http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080824.zip
I checked by the following machine.
-- Disktop(Windows-XP SP2)
Pentium(R) 4 CPU 2.6GHz
Memory 2GB
-- Notebook(Windows-XP SP2)
Pentium III CPU 495 MHz
Memory 256MB
--

Thanks.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>


> Ooops, Please wait for this.
>
>> Please try this.(The date of a binary is 7/8)
>> http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080823.zip
>> I will arrange thoroughly again.
>
> Anyhow, I have only now stale development environment.
> The time of a check is still required. thanks.
>
> Regards,
> Hiroshi Saito
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs


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

Re: [PERFORM] Large number of tables slow insert

Actually, I've got another test system with only few sensors (thus few tables) and it's working well (<10ms insert) with all the indexes.
I know it's slowing down my performance but I need them to interogate the big tables (each one can reach millions rows with time) really fast.

Regards

Loïc

Re: [GENERAL] AT TIME ZONE and DST in UTC<->CET conversion

Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> The problem is that one of these two statements is using the abbrev
>> meaning and the other is using the timezone meaning.

> Is this a TODO?

We already fixed it:

2008-07-07 14:09 tgl

* src/backend/utils/adt/: date.c, timestamp.c (REL8_1_STABLE),
date.c, timestamp.c (REL8_3_STABLE), date.c, timestamp.c
(REL8_2_STABLE), date.c, timestamp.c: Fix AT TIME ZONE (in all
three variants) so that we first try to interpret the timezone
argument as a timezone abbreviation, and only try it as a full
timezone name if that fails. The zic database has four zones (CET,
EET, MET, WET) that are full daylight-savings zones and yet have
names that are the same as their abbreviations for standard time,
resulting in ambiguity. In the timestamp input functions we
resolve the ambiguity by preferring the abbreviation, and AT TIME
ZONE should work the same way. (No functionality is lost because
the zic database also has other names for these zones, eg
Europe/Zurich.) Per gripe from Jaromir Talir.

Backpatch to 8.1. Older releases did not have the issue because AT
TIME ZONE only accepted abbreviations not zone names. (Thus, this
patch also arguably fixes a compatibility botch introduced at 8.1:
in ambiguous cases we now behave the same as 8.0 did.)


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] psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully

On Fri, 22 Aug 2008 18:34:53 -0600
"Scott Marlowe" <scott.marlowe@gmail.com> wrote:

> Glad you got your problem resolved. I have to admit I tend to
> mostly use psql to interact with postgres. Nothing against
> PGAdmin III, it's good software. I just tend to feel more comfy
> scripting things than clicking things. Whether you're using
> pgadmin III or psql, it's important that you have the right
> version. For pgadmin it's usually best to always have the latest
> version, and with psql the one that matches your db.

Is there any secret I don't know?
I mostly use pgadmin because:
1) It is easier to cut and paste code and results
2) It's easier to open several connections
3) you've the object structure to navigate

But I miss psql auto completion.

I know I can call an external editor that would make cut&paste
easier in psql but I'll lose autocompletion and I've had some issues
with pgadmin search&replace and regexp, so I definitively would
enjoy psql more... but what about the rest?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


--
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] Array, ANY and Regular Expressions

"Stefan 'Kaishakunin' Schumacher" <stefan@net-tex.de> writes:
> I have a table with an array column (tags text[]) which I want to
> select from via ANY and RegExes.

> SELECT tags from zettelkasten where 'Sozialpsychologie' ~* any(tags) order by
> ident;

Did you look at the matches? I suspect this isn't behaving even
remotely the way you want, because ~* expects the pattern operand
on the right.

Since there's no SQL syntax with ANY() on the left of the comparison
operator, what you'd need to do to make this work is invent a "reverse
regex" operator that switches its arguments. That'd be pretty trivial
to do with a one-line plpgsql function under it. (I'm not sure what
performance would be like though; as the table grows you might find
yourself needing to change the reversing function to C.)

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: [HACKERS] proposal sql: labeled function params

"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> I thing, so it's possible - in this case. We should transform named
> params to expr after syntax analyze.

You're going to have a hard time making parentheses affect the behavior
if you do it that way.

regards, tom lane

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

Re: [HACKERS] [GENERAL] Surprising syntax error

Bruce Momjian <bruce@momjian.us> writes:
> Peter Eisentraut wrote:
>> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
>>> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
>>
>> The SQL standard doesn't specify it. And there is no need for it.

> While we don't _need_ it, it would make our system more consistent; we
> have made similar changes for views in other areas.

I'm not sure it'd make the system more consistent. Because the SQL
standard says you use GRANT ON TABLE for a view. we'd have to always
ensure that we accepted that; whereas in at least some other places
we are trying to be picky about TABLE/VIEW/SEQUENCE actually matching
the object type.

Given the spec precedent, I'm inclined to leave it alone. It's not like
there aren't plenty of other SQL quirks that surprise novices.

regards, tom lane

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

Re: [HACKERS] proposal sql: labeled function params

"Pavel Stehule" <pavel.stehule@gmail.com> writes:

> Hello
>
> 2008/8/23 Peter Eisentraut <peter_e@gmx.net>:
>> On Friday 22 August 2008 07:41:30 Decibel! wrote:
>>> If we're really worried about it we can have a GUC for a few versions
>>> that turns off named parameter assignment. But I don't think we
>>> should compromise the design on the theory that some folks might be
>>> using that as an operator *and* can't change their application to
>>> wrap it's use in ().
>>
>> Even if that were a reasonable strategy, you can't use GUC parameters to alter
>> parser behavior.
>
> I thing, so it's possible - in this case. We should transform named
> params to expr after syntax analyze.

So for a bit of useless syntactic sugar we should introduce conflicts with
named parameters, conflicts with operators, introduce an un-sqlish syntax and
remove a feature users have already made use of and introduce backwards
compatibility issues for those users?

At any point in this discussion has anyone explained why these labels would
actually be a good idea?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

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

Re: [PATCHES] [HACKERS] WITH RECURSIVE patches 0818

On Sat, Aug 23, 2008 at 03:35:52PM +0900, Tatsuo Ishii wrote:
> > > Here is new patches fixing the bug you pointed out (patches was
> > > created by Yoshiyuki). Also I added your SQL to the regression
> > > test, and now the patches is against CVS HEAD. For your
> > > convenience I also include patches against the previous version.
> >
> > Thanks :)
> >
> > Any progress on the READMEs for this?
>
> I have posted kind of README (implementation.txt) along with patches
> on Aug 18. Have you read it?

Oops. I've now put it up with some minor edits and formatting at
<http://wiki.postgresql.org/wiki/CTEReadme>. It is linked from the
Commitfest page.

> > Also, now that we are into August, would Asaba-san and whomever else
> > like to try out the git repository? To do so, I just need a login
> > name and a public key.
>
> I will send you later.

Thanks :)

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Re: [HACKERS] proposal sql: labeled function params

Hello

2008/8/23 Peter Eisentraut <peter_e@gmx.net>:
> On Friday 22 August 2008 07:41:30 Decibel! wrote:
>> If we're really worried about it we can have a GUC for a few versions
>> that turns off named parameter assignment. But I don't think we
>> should compromise the design on the theory that some folks might be
>> using that as an operator *and* can't change their application to
>> wrap it's use in ().
>
> Even if that were a reasonable strategy, you can't use GUC parameters to alter
> parser behavior.
>

I thing, so it's possible - in this case. We should transform named
params to expr after syntax analyze.

Pavel

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

RE: [pgsql-es-ayuda] NOTIFY del log ??

Lo mismo que hace pg_stat_Activity


*-------------------------------------------------------*
*-Edwin Quijada
*-Developer DataBase
*-JQ Microsistemas
*-809-849-8087
* " Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo comun"
*-------------------------------------------------------*


> Date: Thu, 21 Aug 2008 14:00:52 -0500
> From: jcasanov@systemguards.com.ec
> To: ra_duque@yahoo.com.mx
> Subject: Re: [pgsql-es-ayuda] NOTIFY del log ??
> CC: pgsql-es-ayuda@postgresql.org
>
> 2008/8/21 Raul Andres Duque :
>> Quisiera crear una herramienta "similar" al SQL PROFILER de MSSQL
>
> y que hace esa herramienta?
>
>
> --
> Atentamente,
> Jaime Casanova
> Soporte y capacitación de PostgreSQL
> Asesoría y desarrollo de sistemas
> Guayaquil - Ecuador
> Cel. (593) 87171157
> --
> TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

_________________________________________________________________
Reveal your inner athlete and share it with friends on Windows Live.
http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)

Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi Eric-san.

Done! please check it.
http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080824.zip
I checked by the following machine.
-- Disktop(Windows-XP SP2)
Pentium(R) 4 CPU 2.6GHz
Memory 2GB
-- Notebook(Windows-XP SP2)
Pentium III CPU 495 MHz
Memory 256MB
--

Thanks.

Regards,
Hiroshi Saito

----- Original Message -----
From: "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>


> Ooops, Please wait for this.
>
>> Please try this.(The date of a binary is 7/8)
>> http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080823.zip
>> I will arrange thoroughly again.
>
> Anyhow, I have only now stale development environment.
> The time of a check is still required. thanks.
>
> Regards,
> Hiroshi Saito
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

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

Re: [BUGS] BUG #4274: uuid returns duplicate values

Ooops, Please wait for this.

> Please try this.(The date of a binary is 7/8)
> http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080823.zip
> I will arrange thoroughly again.

Anyhow, I have only now stale development environment.
The time of a check is still required. thanks.

Regards,
Hiroshi Saito

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

Re: [HACKERS] Proposal: new border setting in psql

On Thu, 21 Aug 2008 21:04:07 -0400
"D'Arcy J.M. Cain" <darcy@druid.net> wrote:
> > There's still the question of whether this covers any needs that aren't
> > met just as well by XML or CSV output formats.
>
> Well, we could remove all the display formats except XML. After all,
> it can always be converted to any other format. Of course we wouldn't
> do that. User convenience is all I'm thinking of.

Well, Tom has raised a question about its need and Asko has questioned
whether it should be under a different setting but so far no one has
outright rejected the proposal. Does anyone else have an opinion? I am
attaching a patch for further review.

--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

Re: [ADMIN] pg_log directory

On Thu, 2008-08-21 at 10:02 -0400, Tom Lane wrote:
> With the RPM's logging config you should only have seven daily log
> files in pg_log.

This is not valid for PGDG RPMs :) As I wrote, it will be in 8.4 set.
>
--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

Re: [ADMIN] pg_log directory

On Thu, 2008-08-21 at 09:25 -0400, slamp slamp wrote:
>
> I am using the PGDG rpms. So it has the default logging configs. its
> rotating daily but i have files there since 2007. is there a config
> option to delete these files?

You may want to change log_filename option, and set it to (for example)
"postgresql-%a.log" so that ogs will be rotated weekly.

Actually this is what I'm planning to do for 8.4+ PGDG RPMs.

Regards,
--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi.

----- Original Message -----
From: "Bruce Momjian" <bruce@momjian.us>
> Hiroshi Saito wrote:
>> Hi.
>>
>> Yes, Finally Ralf-san adjusts this patch.
>> http://winpg.jp/~saito/pg_work/OSSP_win32/.
>> Therefore, it is contained in the next release.(1.6.3/4)
>
> OK, good. Does any of this get applied to contrib/uuid-ossp?

There is nothing, uuid-ossp has an official release place. It will evolve uniquely.
Ralf-san supplies a great module to us.!:-)
As for try-uuidwin32 (native-uuid of winapi), it is not suitable to contrib.
However, It may be pgfoundry supposing it is desired.

Thanks!

Regards,
Hiroshi Saito

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

Re: [HACKERS] [GENERAL] Surprising syntax error

Peter Eisentraut wrote:
> On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> > Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?
>
> The SQL standard doesn't specify it. And there is no need for it.

While we don't _need_ it, it would make our system more consistent; we
have made similar changes for views in other areas.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi.

Ehh?..ugaa..sorry..
I made some mistakes, when it probably worked.
Please try this.(The date of a binary is 7/8)
http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080823.zip
I will arrange thoroughly again.
Thanks!

Regards,
Hiroshi Saito

----- Original Message -----
From: "Eric P. Melbardis" <eric.melbardis@netkitsolutions.com>


Hi

I downloaded the latest version from the specified url.
Put dll in the postgres "C:\Program Files\PostgreSQL\8.3\lib" directory, and restarted
postgres service


Sorry, still does not work!

nkworks3=# SELECT test_uuid(10);
INFO: uuid = a1942895-bdb4-484a-a3fd-6b90e7652d8c
INFO: uuid = f2b4a00f-52a0-4a63-aac0-0500b9e6d438
INFO: uuid = f2b4a00f-52a0-4a63-aac0-0500b9e6d438
INFO: uuid = c6607966-0685-4d09-87f5-c593f3dd8924
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
INFO: uuid = b52c719e-6484-49e6-87db-d885d45d7313
test_uuid
-----------

(1 row)

Regards

Eric


-----Original Message-----
From: Hiroshi Saito [mailto:z-saito@guitar.ocn.ne.jp]
Sent: Thursday, August 21, 2008 8:03 PM
To: Bruce Momjian
Cc: Eric P. Melbardis; Nicolas ANTONINI; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #4274: uuid returns duplicate values

Hi.

Yes, Finally Ralf-san adjusts this patch.
http://winpg.jp/~saito/pg_work/OSSP_win32/.
Therefore, it is contained in the next release.(1.6.3/4)

Thanks!!

Regards,
Hiroshi Saito

----- Original Message -----
From: "Bruce Momjian" <bruce@momjian.us>


> Hiroshi Saito wrote:
>> Hi.
>>
>> This can obtain a comfortable result.
>> http://winpg.jp/~saito/pg_work/OSSP_win32/pg8.3.3-win-bin-uuid-ossp-20080706.zip
>>
>> I will adjust with Rarf-san.
>
> Has this been completed?
>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs


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

Re: [pgsql-www] [BUGS] BUG #4279: Bad codepage in our web-site

On Friday 22 August 2008 22:13:16 Andrew Sullivan wrote:
> >       FAQ_brazilian.html:    <META http-equiv="Content-Type"
> > content="text/html; charset=iso-8859-1">
>
> This doesn't need to change because the bottom range of Unicode was made
> the same as ISO 8859-1 in order to make the transition somewhat easier.

The bottom range of Unicode codepoints is the same as ISO 8859-1, but not the
bottom range of UTF-8 encoded bytes.

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

Re: [HACKERS] Feeding results back into select

On Sat, 23 Aug 2008 14:04:30 +0400
Teodor Sigaev <teodor@sigaev.ru> wrote:
> >> select 'a'=>'b';
> >> ?column?
> >> ----------
> >> "a"=>"b"
> "a"=>"b" is a value of hstore type, so query should be:
> select '"a"=>"b"'::hstore;

Of course. Now that I understand it's blindingly obvious that the
double quotes above are part of the string and the insert would be;
INSERT INTO table (hfield) VALUES ('"a"=>"b"');

> " character was chosen to simplify escaping,

To prevent;
INSERT INTO table (hfield) VALUES ('''a''=>''b''');

I guess my brain was pointed elsewhere when I asked. Thanks for not
treating me like an idiot. :-)

--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

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

Re: [HACKERS] [GENERAL] Surprising syntax error

On Tuesday 01 July 2008 01:39:13 Bruce Momjian wrote:
> Is there a downside to adding "VIEW" in parser/gram.y:privilege_target?

The SQL standard doesn't specify it. And there is no need for it.

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

Re: [HACKERS] CREATE CAST too strict?

On Friday 22 August 2008 22:25:08 Bruce Momjian wrote:
> Peter, have you completed this yet?

yes

>
> ---------------------------------------------------------------------------
>
> Peter Eisentraut wrote:
> > Am Mittwoch, 9. Juli 2008 schrieb Peter Eisentraut:
> > > I propose that we relax these two checks to test for
> > > binary-coercibility instead, which is effectively what is expected and
> > > required here anyway.
> >
> > Here is the corresponding patch.
>
> [ Attachment, skipping... ]
>
> > --
> > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-hackers
>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +

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

Re: [HACKERS] proposal sql: labeled function params

On Friday 22 August 2008 07:41:30 Decibel! wrote:
> If we're really worried about it we can have a GUC for a few versions  
> that turns off named parameter assignment. But I don't think we  
> should compromise the design on the theory that some folks might be  
> using that as an operator *and* can't change their application to  
> wrap it's use in ().

Even if that were a reasonable strategy, you can't use GUC parameters to alter
parser behavior.

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

[GENERAL] Array, ANY and Regular Expressions

I have a table with an array column (tags text[]) which I want to
select from via ANY and RegExes.

SELECT tags from zettelkasten where 'Sozialpsychologie' ~* any(tags) order by
ident;

delivers 7 rows

SELECT tags from zettelkasten where 'SoziALPSychologie---FOOBARBAZ' ~* any(tags)
order by ident;

also delivers 7 rows,

however:

SELECT tags from zettelkasten where 'sozial' ~* any(tags) order by ident;

delivers 0 rows.


So how do I select all entries from "zettelkasten" tagged with
e.g. '*psycholog*'?


PS: Keep me CC:'ed, I am not subscribed to this list

mit freundlichen Grüßen
Stefan Schumacher
--
https://deepsec.net/schedule/

Desing and Implementation of Security Awareness Campaigns at
DeepSec Security Conference Vienna/Austria 2008-11-11

Re: [GENERAL] [Q] DNS(bind) ER model

Andrew Sullivan wrote:
> On Fri, Aug 15, 2008 at 09:54:26PM +0200, Tino Wildenhain wrote:
>> looks like you want to write your own "powerdns" ? :-)
>> http://www.powerdns.com/
>
> Oh, right, I forgot they use a SQL back end. They do EDNS0, too :)
>
> (Note, however, that if you plan to deploy DNSSEC you're out of luck
> with them. Bert is hostile to it.)

recent(upcoming 2.9.22) powerdns code actually does have dnssec support
(a bit limited though).
On the other hand getting your typical database backed DNS-managment GUI
to grok DNSSEC is probably turing out to become a challenge.


Stefan

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

[COMMITTERS] pgsql: Fix possible duplicate tuples while GiST scan.

Log Message:
-----------
Fix possible duplicate tuples while GiST scan. Now page is processed
at once and ItemPointers are collected in memory.

Remove tuple's killing by killtuple() if tuple was moved to another
page - it could produce unaceptable overhead.

Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/access/gist:
gistget.c (r1.52.2.1 -> r1.52.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistget.c?r1=1.52.2.1&r2=1.52.2.2)
gistscan.c (r1.61 -> r1.61.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistscan.c?r1=1.61&r2=1.61.2.1)
pgsql/src/include/access:
gist_private.h (r1.8 -> r1.8.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gist_private.h?r1=1.8&r2=1.8.2.1)

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

[COMMITTERS] pgsql: Fix possible duplicate tuples while GiST scan.

Log Message:
-----------
Fix possible duplicate tuples while GiST scan. Now page is processed
at once and ItemPointers are collected in memory.

Remove tuple's killing by killtuple() if tuple was moved to another
page - it could produce unaceptable overhead.

Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/src/backend/access/gist:
gistget.c (r1.62 -> r1.62.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistget.c?r1=1.62&r2=1.62.2.1)
gistscan.c (r1.65 -> r1.65.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistscan.c?r1=1.65&r2=1.65.2.1)
pgsql/src/include/access:
gist_private.h (r1.24 -> r1.24.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gist_private.h?r1=1.24&r2=1.24.2.1)

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

[COMMITTERS] pgsql: Fix possible duplicate tuples while GiST scan.

Log Message:
-----------
Fix possible duplicate tuples while GiST scan. Now page is processed
at once and ItemPointers are collected in memory.

Remove tuple's killing by killtuple() if tuple was moved to another
page - it could produce unaceptable overhead.

Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
pgsql/src/backend/access/gist:
gistget.c (r1.69 -> r1.69.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistget.c?r1=1.69&r2=1.69.2.1)
gistscan.c (r1.68 -> r1.68.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistscan.c?r1=1.68&r2=1.68.2.1)
pgsql/src/include/access:
gist_private.h (r1.28 -> r1.28.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gist_private.h?r1=1.28&r2=1.28.2.1)

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

[COMMITTERS] pgsql: Fix possible duplicate tuples while GiST scan.

Log Message:
-----------
Fix possible duplicate tuples while GiST scan. Now page is processed
at once and ItemPointers are collected in memory.

Remove tuple's killing by killtuple() if tuple was moved to another
page - it could produce unaceptable overhead.

Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.

Modified Files:
--------------
pgsql/src/backend/access/gist:
gistget.c (r1.74 -> r1.75)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistget.c?r1=1.74&r2=1.75)
gistscan.c (r1.70 -> r1.71)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistscan.c?r1=1.70&r2=1.71)
pgsql/src/include/access:
gist_private.h (r1.31 -> r1.32)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gist_private.h?r1=1.31&r2=1.32)

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

Re: [PERFORM] Large number of tables slow insert

Each INDEX create a delay on INSERT. Try to measure performance w/o any
indexes.


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

Re: [HACKERS] Feeding results back into select

>> select 'a'=>'b';
>> ?column?
>> ----------
>> "a"=>"b"

>
> Branching the topic, I have a question about this. I haven't studied
> hstore extensively but this seems like a problem on it's face.
> Shouldn't you be able to take the result of a select and pass it back
> to a select? I mean, what happens if you do this?
>

"a"=>"b" is a value of hstore type, so query should be:
select '"a"=>"b"'::hstore;

" character was chosen to simplify escaping,

> I ran into a similar issue with my chkpass type (see contrib) where the
> string inserted into the field is stored encrypted with functions to
> test for equality basically like the Unix password model works. If I
> just displayed raw strings then a dump and reload would have trashed
> all the passwords by re-encrypting them. What I did was to make a
> special case on input. If the string started with ':' then I strip
> that character and insert the string unchanged. Then I changed the
> output to prepend the ':'. Now dump and reload work.

I see, but your problem is that password is one-way encrypted, so, you
definitely need to distinguish already encrypted strings. Hstore hasn't that
problem.


--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

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