Saturday, June 14, 2008

[pgadmin-hackers] A fix and a new functionnality for the colour patch

Index: pgadmin/include/schema/pgServer.h
===================================================================
--- pgadmin/include/schema/pgServer.h (revision 7373)
+++ pgadmin/include/schema/pgServer.h (working copy)
@@ -110,7 +110,7 @@
bool SetPassword(const wxString& newVal);
wxDateTime GetUpSince() { return upSince; }
void iSetUpSince(const wxDateTime &d) { upSince = d; }
- void iSetColour(const wxString &s) { colour = wxColour(s); }
+ void iSetColour(const wxString &s) { colour = s.Length() == 0 ? wxColour(wxT("#ffffff")) : wxColour(s); }
wxColour GetColour() { return colour; }

bool HasPrivilege(const wxString &objTyp, const wxString &objName, const wxString &priv) { return conn->HasPrivilege(objTyp, objName, priv); }
Index: pgadmin/include/dlg/dlgServer.h
===================================================================
--- pgadmin/include/dlg/dlgServer.h (revision 7373)
+++ pgadmin/include/dlg/dlgServer.h (working copy)
@@ -42,6 +42,7 @@
void OnChangeRestr(wxCommandEvent &ev);
void OnChangeTryConnect(wxCommandEvent &ev);
void OnPageSelect(wxNotebookEvent &event);
+ void OnChooseColor(wxCommandEvent &ev);

DECLARE_EVENT_TABLE()
};
Index: pgadmin/dlg/dlgServer.cpp
===================================================================
--- pgadmin/dlg/dlgServer.cpp (revision 7373)
+++ pgadmin/dlg/dlgServer.cpp (working copy)
@@ -11,6 +11,7 @@

// wxWindows headers
#include <wx/wx.h>
+#include <wx/colordlg.h>

// App headers
#include "pgAdmin3.h"
@@ -37,6 +38,7 @@
#define txtPassword CTRL_TEXT("txtPassword")
#define txtDbRestriction CTRL_TEXT("txtDbRestriction")
#define txtColour CTRL_TEXT("txtColour")
+#define btnColor CTRL_BUTTON("btnColor")


BEGIN_EVENT_TABLE(dlgServer, dlgProperty)
@@ -53,6 +55,7 @@
EVT_CHECKBOX(XRCID("chkRestore"), dlgProperty::OnChange)
EVT_CHECKBOX(XRCID("chkTryConnect"), dlgServer::OnChangeTryConnect)
EVT_TEXT(XRCID("txtColour"), dlgProperty::OnChange)
+ EVT_BUTTON(XRCID("btnColor"), dlgServer::OnChooseColor)
EVT_BUTTON(wxID_OK, dlgServer::OnOK)
END_EVENT_TABLE();

@@ -232,7 +235,7 @@
chkStorePwd->SetValue(server->GetStorePwd());
chkRestore->SetValue(server->GetRestore());
txtDbRestriction->SetValue(server->GetDbRestriction());
- txtColour->SetValue(server->GetColour().GetAsString(wxC2S_HTML_SYNTAX));
+ txtColour->SetValue(server->GetColour().GetAsString(wxC2S_HTML_SYNTAX));

stPassword->Disable();
txtPassword->Disable();
@@ -290,6 +293,16 @@
}


+void dlgServer::OnChooseColor(wxCommandEvent &ev)
+{
+ wxColourDialog dlg( NULL );
+ if ( dlg.ShowModal() == wxID_OK )
+ {
+ txtColour->SetValue(dlg.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX));
+ }
+}
+
+
void dlgServer::CheckChange()
{
wxString name=GetName();
Index: pgadmin/ui/dlgServer.xrc
===================================================================
--- pgadmin/ui/dlgServer.xrc (revision 7373)
+++ pgadmin/ui/dlgServer.xrc (working copy)
@@ -122,6 +122,10 @@
<pos>70,169d</pos>
<size>75,-1d</size>
</object>
+ <object class="wxButton" name="btnColor">
+ <label>Choose Color...</label>
+ <pos>150,169d</pos>
+ </object>
</object>
<selected>1</selected>
</object>
@@ -144,4 +148,4 @@
<size>218,225d</size>
<style></style>
</object>
-</resource>
\ No newline at end of file
+</resource>
Hi,

The colour patch commited by Dave during pgCon2008 allows a user to add
a background color to the treeview for each specific registered server.

When a user deletes the colour in the server's property, pgAdmin will
use a black (#000000) background. The treeview node's text will be
unreadable. What the patch does is impliying white colour when the user
doesn't spécify a colour.

The new functionality adds a colour button that opens the standard
colour dialog. The user doesn't new to know the HTML colour coding.

Comments?

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

Re: [GENERAL] Source RPM for 8.3.3?

On Saturday 14 June 2008 10:33:15 Devrim GÜNDÜZ wrote:
> Hi,
>
> On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote:
> > I was browsing the postgresql download site, but I wasn't able to find
> > the source RPM for 8.3.3. Is it available on the site?
>
> I just finished uploading 8.3.3 SRPMs. They will be on
> ftp.postgresql.org in a few hours, after sync.
>
> Also you can grab them from here:
>
> http://yum.pgsqlrpms.org/srpms/8.3/
>
> Regards,

Devrim,

have you ever thought about using OpenSuSE's build service? Your RPMs are
more complete -- i.e. they include the scripting languages as well -- than the
ones available for OpenSuSE...

And the build service already creates packages for Fedora and other
distributions.

https://build.opensuse.org/

Here's a list of supported distributions:


Distribution


openSUSE Factory


openSUSE 10.3


openSUSE 10.2


SUSE Linux 10.1


SLE 10


SUSE Linux 10.0


SUSE Linux 9.3


SLES 9


CentOS 5


RHEL 4


RHEL 5


Fedora 6 with Extras


Fedora 7 with Extras


Fedora 8 with Extras


Mandriva 2006


Mandriva 2007


Mandriva 2008


It lacks Fedora 9, though... But I believe that it wouldn't be hard to have
it added to the list. Specially to have more people using those "standard"
RPM packages for all the distributions above.


Regards,
--
Jorge Godoy <jgodoy@gmail.com>

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

Re: [GENERAL] why sequential scan is used on indexed column ???

Julius Tuskenis <julius.tuskenis@gmail.com> schrieb:

> Hello.
>
> I have a question concerning performance. One of my queries take a long
> to execute. I tried to do "explain analyse" and I see that the
> sequential scan is being used, although I have indexes set on columns
> that are used in joins. The question is - WHY, and how to change that
> behavior???

Try to create an index on apsilankymai.sas_id

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

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

[pgadmin-hackers] SVN Commit by guillaume: r7374 - trunk/pgadmin3

Author: guillaume

Date: 2008-06-14 15:44:17 +0100 (Sat, 14 Jun 2008)

New Revision: 7374

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=7374&view=rev

Log:
Update pot file.

Modified:
trunk/pgadmin3/pgadmin3.pot

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

[GENERAL] why sequential scan is used on indexed column ???

Hello.

I have a question concerning performance. One of my queries take a long
to execute. I tried to do "explain analyse" and I see that the
sequential scan is being used, although I have indexes set on columns
that are used in joins. The question is - WHY, and how to change that
behavior???

The DBMS: pgSQL 8.1.4 on gentoo linux.

The query:

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190

result:
"Hash Join (cost=5.17..10185.89 rows=6047 width=138) (actual
time=10698.539..10698.539 rows=0 loops=1)"
" Hash Cond: ("outer".aps_saskaita = "inner".sas_id)"
" -> Seq Scan on apsilankymai (cost=0.00..8618.50 rows=300350
width=42) (actual time=2121.310..6470.721 rows=300350 loops=1)"
" -> Hash (cost=5.14..5.14 rows=9 width=96) (actual
time=31.545..31.545 rows=1 loops=1)"
" -> Bitmap Heap Scan on b_saskaita (cost=2.03..5.14 rows=9
width=96) (actual time=31.473..31.489 rows=1 loops=1)"
" Recheck Cond: (sas_subjektas = 20190)"
" -> Bitmap Index Scan on idx_sas_subjektas
(cost=0.00..2.03 rows=9 width=0) (actual time=25.552..25.552 rows=1
loops=1)"
" Index Cond: (sas_subjektas = 20190)"
"Total runtime: 10698.780 ms"


The tables with indexes:


CREATE TABLE b_saskaita
(
sas_id serial NOT NULL,
sas_tevas integer,
sas_kreditas numeric(8,2) NOT NULL DEFAULT 0,
sas_statusas smallint NOT NULL DEFAULT 1,
sas_subjektas integer,
sas_kam_naudojama integer,
sas_pastaba character varying(100),
CONSTRAINT b_saskaita_pkey PRIMARY KEY (sas_id),
CONSTRAINT fk_sas_subjektas FOREIGN KEY (sas_subjektas)
REFERENCES subjektas (sub_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_saskaitos_tevas FOREIGN KEY (sas_tevas)
REFERENCES b_saskaita (sas_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE b_saskaita OWNER TO postgres;
GRANT ALL ON TABLE b_saskaita TO postgres;
GRANT ALL ON TABLE b_saskaita TO public;

CREATE INDEX fki_sas_subjektas
ON b_saskaita
USING btree
(sas_subjektas);


CREATE TABLE apsilankymai
(
aps_id serial NOT NULL,
aps_abonementas integer NOT NULL,
aps_atejo timestamp(0) without time zone NOT NULL,
aps_isejo timestamp(0) without time zone,
aps_ileidimas integer,
aps_zetonas integer NOT NULL,
aps_padalinys integer NOT NULL,
aps_saskaita integer,
aps_statusas smallint DEFAULT 0,
CONSTRAINT apsilankymai_pkey PRIMARY KEY (aps_id),
CONSTRAINT fk_apsilankymo_abonementas FOREIGN KEY (aps_abonementas)
REFERENCES subjekto_abonementai (sab_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_padalinys FOREIGN KEY (aps_padalinys)
REFERENCES padalinys (pad_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT,
CONSTRAINT fk_apsilankymo_saskaita FOREIGN KEY (aps_saskaita)
REFERENCES b_saskaita (sas_id) MATCH FULL
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_zetonas FOREIGN KEY (aps_zetonas)
REFERENCES zetonai (zet_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE apsilankymai OWNER TO postgres;
GRANT ALL ON TABLE apsilankymai TO postgres;
GRANT ALL ON TABLE apsilankymai TO public;
COMMENT ON COLUMN apsilankymai.aps_ileidimas IS 'jei apsilankymas neturi
skaitytis - nurodoma kuris apsilankymas yra pagrindinis';
COMMENT ON COLUMN apsilankymai.aps_padalinys IS 'kuriame padalinyje
lankesi zmogus. reikalingas, kai norim skaiciuoti kartus zmoniu turinciu
abonementa keliuose klubuose';
COMMENT ON COLUMN apsilankymai.aps_statusas IS '0 - neiejes, 1 - viduje,
2 - isejes';


CREATE INDEX idx_aps_saskaita
ON apsilankymai
USING btree
(aps_saskaita);


Thank you in advance.

--

Julius Tuskenis


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

[pgus-general] why sequential scan is used on indexed column ???

Hello.

I have a question concerning performance. One of my queries take a long
to execute. I tried to do "explain analyse" and I see that the
sequential scan is being used, although I have indexes set on columns
that are used in joins. The question is - WHY, and how to change that
behavior???

The DBMS: pgSQL 8.1.4 on gentoo linux.

The query:

explain analyze
select *
FROM b_saskaita JOIN apsilankymai ON (aps_saskaita = sas_id)
where sas_subjektas = 20190

result:
"Hash Join (cost=5.17..10185.89 rows=6047 width=138) (actual
time=10698.539..10698.539 rows=0 loops=1)"
" Hash Cond: ("outer".aps_saskaita = "inner".sas_id)"
" -> Seq Scan on apsilankymai (cost=0.00..8618.50 rows=300350
width=42) (actual time=2121.310..6470.721 rows=300350 loops=1)"
" -> Hash (cost=5.14..5.14 rows=9 width=96) (actual
time=31.545..31.545 rows=1 loops=1)"
" -> Bitmap Heap Scan on b_saskaita (cost=2.03..5.14 rows=9
width=96) (actual time=31.473..31.489 rows=1 loops=1)"
" Recheck Cond: (sas_subjektas = 20190)"
" -> Bitmap Index Scan on idx_sas_subjektas
(cost=0.00..2.03 rows=9 width=0) (actual time=25.552..25.552 rows=1
loops=1)"
" Index Cond: (sas_subjektas = 20190)"
"Total runtime: 10698.780 ms"


The tables with indexes:


CREATE TABLE b_saskaita
(
sas_id serial NOT NULL,
sas_tevas integer,
sas_kreditas numeric(8,2) NOT NULL DEFAULT 0,
sas_statusas smallint NOT NULL DEFAULT 1,
sas_subjektas integer,
sas_kam_naudojama integer,
sas_pastaba character varying(100),
CONSTRAINT b_saskaita_pkey PRIMARY KEY (sas_id),
CONSTRAINT fk_sas_subjektas FOREIGN KEY (sas_subjektas)
REFERENCES subjektas (sub_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_saskaitos_tevas FOREIGN KEY (sas_tevas)
REFERENCES b_saskaita (sas_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE b_saskaita OWNER TO postgres;
GRANT ALL ON TABLE b_saskaita TO postgres;
GRANT ALL ON TABLE b_saskaita TO public;

CREATE INDEX fki_sas_subjektas
ON b_saskaita
USING btree
(sas_subjektas);


CREATE TABLE apsilankymai
(
aps_id serial NOT NULL,
aps_abonementas integer NOT NULL,
aps_atejo timestamp(0) without time zone NOT NULL,
aps_isejo timestamp(0) without time zone,
aps_ileidimas integer,
aps_zetonas integer NOT NULL,
aps_padalinys integer NOT NULL,
aps_saskaita integer,
aps_statusas smallint DEFAULT 0,
CONSTRAINT apsilankymai_pkey PRIMARY KEY (aps_id),
CONSTRAINT fk_apsilankymo_abonementas FOREIGN KEY (aps_abonementas)
REFERENCES subjekto_abonementai (sab_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_padalinys FOREIGN KEY (aps_padalinys)
REFERENCES padalinys (pad_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT,
CONSTRAINT fk_apsilankymo_saskaita FOREIGN KEY (aps_saskaita)
REFERENCES b_saskaita (sas_id) MATCH FULL
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT fk_apsilankymo_zetonas FOREIGN KEY (aps_zetonas)
REFERENCES zetonai (zet_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE apsilankymai OWNER TO postgres;
GRANT ALL ON TABLE apsilankymai TO postgres;
GRANT ALL ON TABLE apsilankymai TO public;
COMMENT ON COLUMN apsilankymai.aps_ileidimas IS 'jei apsilankymas neturi
skaitytis - nurodoma kuris apsilankymas yra pagrindinis';
COMMENT ON COLUMN apsilankymai.aps_padalinys IS 'kuriame padalinyje
lankesi zmogus. reikalingas, kai norim skaiciuoti kartus zmoniu turinciu
abonementa keliuose klubuose';
COMMENT ON COLUMN apsilankymai.aps_statusas IS '0 - neiejes, 1 - viduje,
2 - isejes';


CREATE INDEX idx_aps_saskaita
ON apsilankymai
USING btree
(aps_saskaita);


Thank you in advance.

--

Julius Tuskenis


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

Re: [pgsql-www] Translated documentations

Tatsuo Ishii wrote:
> Hi,
>
> JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
> docs into Japanese and been distributing through their web site. The
> translation work is surprisingly fast, usually Japanese translated
> docs are uploaded no later than 1 week after PostgreSQL is
> released. Thanks those who are volunteering the work.
>
> I think it would be nice that PostgreSQL main web site has the
> translated docs or has a link to them. Many open source projects do
> this way. This is not only usefull but good to appeal how the world
> wide PostgreSQL commnuities help each other.
>
> What do you think?

I think it is a great idea.

--
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-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www

Re: [pgadmin-support] Weird Popup Menus - pgAdmin 1.8.4

Dave Page a écrit :
> On Fri, Jun 13, 2008 at 11:56 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> There were a bunch of answers. It seems my idea was right. Julian Smart will
>> probably revert part of the patch that breaks our shortcuts handling.
>
> Oh, cool. How was your first foray into the wxWidgets community?
> Hopefully it didn't feel too strange and alien :-)
>

:)

Strictly speaking, I'm not a wxWidgets fan. I would definitely prefer qt.

Anyways, they were friendly and quick to answer. I'm now subscribed to
their wx-users list, and some messages are interesting. It gives me a
better idea of this widgets' toolkit.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

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

[ADMIN] Storing images and other data in PostgreSQL from Ms Access

Hi All,
I am testing the postgresql as a back-end for a project having ms access as a front-end. I have linked postgresql tables and started using. It works well for all data except the binary data. When used to insert/retrieve data from such fields, ms access gives error that it can't recognize the data.
What to do? As per my knowledge postgresql adds some bytes to the binary data to be uploaded. I have eralier used mysql and it work well. Is there any solution for this?

Please help.
I am using Postgresql 8.3.1 and unicode driver with MS Access 2003 and most current patches from microsoft applied on Windows Xp.

Thanks
CPK

--
Keep your Environment clean and green.

Re: [pgsql-es-ayuda] nuevo release

José Fermín Francisco Ferreras wrote:
> Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2?? Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>
> _________________________________________________________________
> Do more with your photos with Windows Live Photo Gallery.
> http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_photos_022008
>
la 8.3.2 iba a salir inclusive aparecio en los mirrors pero se detecto
otra falla antes del anuncio oficial por eso se libero la 8.3.3 y no
se anuncio o libero realmente la 8.3.2 lo mismo con la 8.2.8 8.1.12

Saludos ..

Leonel

--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)

[ANNOUNCE] New RPM Sets for Fedora / Red Hat Enterprise Linux / CentOS

---------------------------------------------------------------------
PostgreSQL New RPM Sets
2008-06-14

Versions: 8.3.3, 8.2.9, 8.1.13, 8.0.17, 7.4.21

Set label: 8.3.3-1PGDG, 8.2.9-1PGDG,, 8.1.13-1PGDG 8.0.17-1PGDG, 7.4.21-1PGDG
---------------------------------------------------------------------

---------------------------------------------------------------------
Release Info:

PostgreSQL RPM Building Project has released RPMs for new PostgreSQL
minor releases, and they are available in main FTP site and its mirrors.
Users should upgrade to these versions as soon as possible.

We currently have RPMs for:

- Fedora Core 7 (x86 and x86_64)
- Fedora Core 8 (x86 and x86_64)
- Fedora Core 9 (x86 and x86_64)
- Red Hat Enterprise Linux / CentOS 4 (x86 and x86_64)
- Red Hat Enterprise Linux / CentOS 5 (x86 and x86_64)

More may come later.

For complete list of changes in RPM sets, please refer to the changelogs
in the RPMs. Use
rpm -q -changelog package_name
for querying the changelog.

Since this release is not a major release, it will not requires a
dump/reload from the previous release. However, if you are upgrading
from very early releases, you may need to upgrade. Please see PostgreSQL
Release Notes to confirm procedures for this.

The SRPMs are also provided. Please note that we have different SRPMs
for all platforms.

We also have a howto document about RPM installation of PostgreSQL:

http://pgfoundry.org/docman/?group_id=1000048

There is another excellent howto:

http://www.westnet.com/~gsmith/gregsmith/content/postgresql/pgrpm.htm


Please follow the instructions before installing/upgrading.

Each RPM has been signed automagically, and each directory contains
CURRENT_MAINTAINER file which includes the name/email of the
package builder and link to PGDG RPM Building Project PGP key.

If you experience problems with the RPMs or if you have feature
requests, please join

pgsqlrpms-general ( at ) pgfoundry ( dot ) org

More info about the list is found at:

http://lists.pgfoundry.org/mailman/listinfo/pgsqlrpms-general

The project page is:

http://pgfoundry.org/projects/pgsqlrpms

Please do not use these resources for issue running or using PostgreSQL
once it is installed. Please download these files from:



http://www.postgresql.org/ftp/binary/v8.3.3/linux/


http://www.postgresql.org/ftp/binary/v8.2.9/linux/

http://www.postgresql.org/ftp/binary/v8.1.13/linux/

http://www.postgresql.org/ftp/binary/v8.0.17/linux/

http://www.postgresql.org/ftp/binary/v7.4.21/linux/

If you are looking more PostgreSQL related RPMs, please visit:

http://yum.pgsqlrpms.org


Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

Re: [pgadmin-hackers] Enabling SQL text field in the SQL tab of object dialog

Index: pgadmin/include/dlg/dlgProperty.h
===================================================================
--- pgadmin/include/dlg/dlgProperty.h (revision 7373)
+++ pgadmin/include/dlg/dlgProperty.h (working copy)
@@ -86,6 +86,7 @@
void OnChange(wxCommandEvent &ev);
void OnChangeOwner(wxCommandEvent &ev);
void OnChangeStc(wxStyledTextEvent& event);
+ void OnChangeReadOnly(wxCommandEvent& event);

protected:
void AddUsers(ctlComboBoxFix *cb1, ctlComboBoxFix *cb2=0);
@@ -97,7 +98,7 @@
pgDatabase *database;

frmMain *mainForm;
- ctlSQLBox *sqlPane;
+ wxPanel *sqlPane;

wxTextValidator numericValidator;

@@ -105,6 +106,8 @@
wxTextCtrl *txtName, *txtOid, *txtComment;
ctlComboBox *cbOwner;
ctlComboBox *cbClusterSet;
+ wxCheckBox *chkReadOnly;
+ ctlSQLBox *sqlTextField;

int width, height;
wxTreeItemId item, owneritem;
Index: pgadmin/dlg/dlgProperty.cpp
===================================================================
--- pgadmin/dlg/dlgProperty.cpp (revision 7373)
+++ pgadmin/dlg/dlgProperty.cpp (working copy)
@@ -59,8 +59,6 @@
#include "schema/pgUser.h"


-
-
class replClientData : public wxClientData
{
public:
@@ -72,6 +70,9 @@
};


+#define CTRLID_CHKSQLTEXTFIELD 1000
+
+
BEGIN_EVENT_TABLE(dlgProperty, DialogWithHelp)
EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbNotebook"), dlgProperty::OnPageSelect)

@@ -80,6 +81,8 @@
EVT_COMBOBOX(XRCID("cbOwner"), dlgProperty::OnChange)
EVT_TEXT(XRCID("txtComment"), dlgProperty::OnChange)

+ EVT_CHECKBOX(CTRLID_CHKSQLTEXTFIELD, dlgProperty::OnChangeReadOnly)
+
EVT_BUTTON(wxID_HELP, dlgProperty::OnHelp)
EVT_BUTTON(wxID_OK, dlgProperty::OnOK)
EVT_BUTTON(wxID_APPLY, dlgProperty::OnApply)
@@ -90,6 +93,7 @@
{
readOnly=false;
sqlPane=0;
+ sqlTextField=0;
processing=false;
mainForm=frame;
database=0;
@@ -311,7 +315,34 @@

void dlgProperty::CreateAdditionalPages()
{
- sqlPane = new ctlSQLBox(nbNotebook, CTL_PROPSQL, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY | wxTE_RICH2);
+ int width, height;
+
+ // get a few sizes and widths
+#ifdef __WIN32__
+ GetClientSize(&width, &height);
+#else
+ nbNotebook->GetClientSize(&width, &height);
+ height -= ConvertDialogToPixels(wxPoint(0, 20)).y; // sizes of tabs
+#endif
+ wxPoint zeroPos=ConvertDialogToPixels(wxPoint(5, 5));
+ wxSize chkSize=ConvertDialogToPixels(wxSize(65,12));
+
+ // add a panel
+ sqlPane = new wxPanel(nbNotebook);
+
+ // add checkbox to the panel
+ chkReadOnly = new wxCheckBox(sqlPane, CTRLID_CHKSQLTEXTFIELD, wxT("Read only"),
+ wxPoint(zeroPos.x, zeroPos.y),
+ chkSize);
+ chkReadOnly->SetValue(true);
+
+ // add ctlSQLBox to the panel
+ sqlTextField = new ctlSQLBox(sqlPane, CTL_PROPSQL,
+ wxPoint(zeroPos.x, zeroPos.y + chkSize.GetHeight()),
+ wxSize(width - 2*zeroPos.x, height - 2*zeroPos.y),
+ wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_RICH2);
+
+ // add panel to the notebook
nbNotebook->AddPage(sqlPane, wxT("SQL"));
}

@@ -506,6 +537,42 @@
}


+void dlgProperty::OnChangeReadOnly(wxCommandEvent &ev)
+{
+ size_t pos;
+
+ sqlTextField->SetReadOnly(chkReadOnly->GetValue());
+ for (pos = 0; pos < nbNotebook->GetPageCount() - 1; pos++)
+ {
+ nbNotebook->GetPage(pos)->Enable(chkReadOnly->GetValue());
+ }
+
+ if (chkReadOnly->GetValue())
+ {
+ // create a function because this is a duplicated code
+ sqlTextField->SetReadOnly(false);
+ if (btnOK->IsEnabled())
+ {
+ wxString tmp;
+ if (cbClusterSet && cbClusterSet->GetSelection() > 0)
+ {
+ replClientData *data=(replClientData*)cbClusterSet->GetClientData(cbClusterSet->GetSelection());
+ tmp.Printf(_("-- Execute replicated using cluster \"%s\", set %ld\n"), data->cluster.c_str(), data->setId);
+ }
+ sqlTextField->SetText(tmp + GetSql() + GetSql2());
+ }
+ else
+ {
+ if (GetObject())
+ sqlTextField->SetText(_("-- nothing to change"));
+ else
+ sqlTextField->SetText(_("-- definition incomplete"));
+ }
+ sqlTextField->SetReadOnly(true);
+ }
+}
+
+
bool dlgProperty::tryUpdate(wxTreeItemId collectionItem)
{
ctlTree *browser=mainForm->GetBrowser();
@@ -753,7 +820,16 @@
return;
}

- wxString sql=GetSql();
+ wxString sql;
+ if (chkReadOnly->GetValue())
+ {
+ sql = GetSql();
+ }
+ else
+ {
+ sql = sqlTextField->GetText();
+ }
+
wxString sql2=GetSql2();

if (!apply(sql, sql2))
@@ -768,9 +844,10 @@

void dlgProperty::OnPageSelect(wxNotebookEvent& event)
{
- if (sqlPane && event.GetSelection() == (int)nbNotebook->GetPageCount()-1)
+ if (sqlTextField && chkReadOnly->GetValue() &&
+ event.GetSelection() == (int)nbNotebook->GetPageCount()-1)
{
- sqlPane->SetReadOnly(false);
+ sqlTextField->SetReadOnly(false);
if (btnOK->IsEnabled())
{
wxString tmp;
@@ -779,16 +856,16 @@
replClientData *data=(replClientData*)cbClusterSet->GetClientData(cbClusterSet->GetSelection());
tmp.Printf(_("-- Execute replicated using cluster \"%s\", set %ld\n"), data->cluster.c_str(), data->setId);
}
- sqlPane->SetText(tmp + GetSql() + GetSql2());
+ sqlTextField->SetText(tmp + GetSql() + GetSql2());
}
else
{
if (GetObject())
- sqlPane->SetText(_("-- nothing to change"));
+ sqlTextField->SetText(_("-- nothing to change"));
else
- sqlPane->SetText(_("-- definition incomplete"));
+ sqlTextField->SetText(_("-- definition incomplete"));
}
- sqlPane->SetReadOnly(true);
+ sqlTextField->SetReadOnly(true);
}
}

Dave Page a écrit :
> Guillaume Lelarge wrote:
> [...]
>> Ideas ? Comments ?
>
> I think I'd like to see a prototype so we can get a feel for how it
> would work and what might explode. It shouldn't be too hard to do - just
> add an option to the SQL tab, and when selected, lock the tabset to that
> tab. That should be doable on the appropriate base class.
>

Finally, here is the prototype. As I first talked about this one year
ago, I will summarize the idea : adding a checkbox on the SQL tab of an
object's properties to let the user change the SQL query. Checking will
disable the contents of the other tabs because we don't want to try to
reverse engineer the user's changes.

So, here is the patch that does this. I'm sure there's work left to do
(most notably some duplicate code) but, at least, it works for me on two
different scenarios : changing the SQL query and adding another SQL query.

Comments are welcome.

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

Re: [pgsql-es-ayuda] nuevo release

2008/6/14 José Fermín Francisco Ferreras <josefermin54@hotmail.com>:
> Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la
> versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero,
> cuando salió la versión 8.3.2??
> Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??
>


oops... de veras que nadie lo anuncio aca...

La version 8.3.3 (y tambien las versiones 8.2.9, 8.1.13, 8.0.17 y
7.4.21) salio el Jueves 12, las versiones 8.3.2, 8.2.8, 8.1.12, 8.0.16
y 7.4.20 nunca fueron liberadas *oficialmente* por un error que se
encontro justo antes de su lanzamiento pero si estuvieron disponibles
un par de dias la semana pasada

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

RE: [pgsql-es-ayuda] nuevo release

Excusenme, ya ví q tardaron 3 días!!


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


From: josefermin54@hotmail.com
To: pgsql-es-ayuda@postgresql.org
Subject: [pgsql-es-ayuda] nuevo release
Date: Sat, 14 Jun 2008 13:51:12 +0000

Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2??
Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free


Stop squinting -- view your photos on your TV. Learn more

[pgsql-es-ayuda] nuevo release

Hola lista, estoy hoy viendo la pagina web d postgresql y veo q salió la versión 8.3.3; no se si estuve durmiendo mucho tiempo o algo así, pero, cuando salió la versión 8.3.2??
Y cuanto tiempo duraron para pasar d la 8.3.2 a la 8.3.3??


<html><div>ing. José Fermín Francisco Ferreras <BR>San Francisco de Macorís, Rep. Dom. <BR></div></html>


Do more with your photos with Windows Live Photo Gallery. Get Windows Live-Free

Re: [pgadmin-support] Weird Popup Menus - pgAdmin 1.8.4

On Fri, Jun 13, 2008 at 11:56 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> There were a bunch of answers. It seems my idea was right. Julian Smart will
> probably revert part of the patch that breaks our shortcuts handling.

Oh, cool. How was your first foray into the wxWidgets community?
Hopefully it didn't feel too strange and alien :-)

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

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

Re: [GENERAL] Source RPM for 8.3.3?

Hi,

On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote:
> I was browsing the postgresql download site, but I wasn't able to find
> the source RPM for 8.3.3. Is it available on the site?

I just finished uploading 8.3.3 SRPMs. They will be on
ftp.postgresql.org in a few hours, after sync.

Also you can grab them from here:

http://yum.pgsqlrpms.org/srpms/8.3/

Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

Re: [pgadmin-hackers] Comments on a separate tab?

On Sat, Jun 14, 2008 at 9:50 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Hi,
>
> Properties dialog takes a lot of space. I think it's mainly because of the
> comments textfield. I would find great to put it on its own tab. I haven't
> actually look at the code to see if that's possible at all. I would like to
> know your feelings about this.

Should be straighforward technically speaking, just a bit of effort
because of all the dialogues that would need updating. It seems like a
nice idea, but currently the comment box acts as a 'filler' to ensure
the dialogues look full. Not sure they would all look correct with it
someplace else.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 1:25 PM, Jonathan Fuerth <fuerth@sqlpower.ca> wrote:
> On Sat, Jun 14, 2008 at 2:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>
>> What would be cool is if it could track the version RSS feed from
>> www.postgresql.org to figure out when it needs to go out and check the
>> others...
>>
>
> Well, which one is most likely to be correct? If the RSS feed needs to
> be updated manually after the new release is added to the FTP site,
> maybe it would make more sense to add the RSS to the list of "pages"
> to verify for up-to-dateness. The primary source of information should
> be correct by default (which is why I'm looking at FTP directory
> names--assuming the release exists iff you can download the source
> code).

The RSS feed is the definitive source. We preload binaries and source
tarballs onto the ftp site a few days before the release, so we don't
want your script bugging us prior to the actual launch otherwise it'll
end up getting forgotten. The data source for the RSS feed is one of
the things that gets updated *at* release time.

Oh, and I would suggest running it daily. If the folks updating the
sites cannot handle same-day updates, or on the odd occasion ignoring
a couple of emails until they can do the update, then they're probably
not the most appropriate people for handling this kind of task anyway.

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

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

Re: [GENERAL] Nested IMMUTABLE functions

Peter wrote:
> I have two immutable Pl/PG funcs - func A takes a parameter X, looks up
> related value Y from a table and passes Y to func B. Now, if I do something
> like
>
> select A(field_x) from bigtable
>
> it will, of course call A for every single row since paramater is changing.
> However, it also calls func B for every row even though most (actually all)
> related values Y are the same!
>
> Is this by design, or flaw in optimizer? I thought immutable funcs with the
> same arguments are only called once within a scope of single query, and that
> 'select A(...)' should have counted as single query, right?

No, not really.
Its rather that the optimizer doesn't consider the content of any
functions that are called. Mostly since this is near to impossible. So
if you call a function, that function will be executed. Any functions
calls internally will therefore also be executed.

A second point is that the optimizer CANNOT make any assumptions on your
data. Your assumption that you look up a value that is nearly always the
same, is not taken into account by the optimizer.

> This stuff is killing me... func B is small, all table lookups optimized to
> the hilt but still I'm taking major performance hit as it's called
> hundreds/thousands of times.

What you can try is the following:
SELECT B(lookuptable.value)
FROM bigtable INNER JOIN lookuptable ON lookuptable.key =
A(bigtable.whatever)

> Any ideas?

A second part is the cost of the actual function. Depending on the costs
various things might be chosen by the optimizer. This should at least
pull out the lookup from your functions, so the optimizer will take them
into consideration.

I can't tell you how SQL stored procedures are handled, but you can be
pretty sure that any PL/* languages are considered as normal procedure
calls by the optimizer.

- Joris

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

On Sat, Jun 14, 2008 at 2:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>
> What would be cool is if it could track the version RSS feed from
> www.postgresql.org to figure out when it needs to go out and check the
> others...
>

Well, which one is most likely to be correct? If the RSS feed needs to
be updated manually after the new release is added to the FTP site,
maybe it would make more sense to add the RSS to the list of "pages"
to verify for up-to-dateness. The primary source of information should
be correct by default (which is why I'm looking at FTP directory
names--assuming the release exists iff you can download the source
code).

But I'm assuming the RSS is not generated automatically and the
content at http://www.postgresql.org/ftp/source/ is. I could very well
have the wrong idea about how everything fits together.

Either way, I like your idea of optimizing the checker not to check
all the other pages unless the primary source's version number
changes. Remembering the previous maximum version number would also
allow warnings such as "maximum version is now 8.3.2; last time I
checked it was 8.3.3."

-Jonathan

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

Re: [GENERAL] Backup using GiT?

On Fri, Jun 13, 2008 at 11:11 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Tom Lane wrote:
>> "James B. Byrne" <byrnejb@harte-lyne.ca> writes:
>
>> > GiT works by compressing deltas of the contents of successive versions of file
>> > systems under repository control. It treats binary objects as just another
>> > object under control. The question is, are successive (compressed) dumps of
>> > an altered database sufficiently similar to make the deltas small enough to
>> > warrant this approach?
>>
>> No. If you compress it, you can be pretty certain that the output will
>> be different from the first point of difference to the end of the file.
>> You'd have to work on uncompressed output, which might cost more than
>> you'd end up saving ...
>
> The other problem is that since the tables are not dumped in any
> consistent order, it's pretty unlikely that you'd get any similarity
> between two dumps of the same table. To get any benefit, you'd need to
> get pg_dump to dump sorted tuples.
>
> --
> Alvaro Herrera

http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

The idea of using GIT for backing-up databases is not that bad.

I would propose the following:
-- dump the creation script in a separate file; (or maybe one file
per object (table, view, function) etc.;)
-- dump the content of each table in it's own file;
-- dump the tuples sorted but in plain text (as COPY data or
INSERTS maybe); (as Alvaro suggested);
-- don't use compression (as Tom and Chander suggested) because
GIT already uses compression for the packed files;

One advantage of using GIT in the manner described previously will
be change tracking by doing just a simple git diff you could see the
modifications (inserts, updates, deletes, etc., schema alteration).
Going a step further you could also do merges between multiple
databases with the same structure (each database would have it's own
branch).

Just imagine how simple a database schema upgrade will be in most
situations, when both the development and the deployed schema have
been modified and we want to put them into sync.

As a conclusion I would subscribe to such an idea.

Ciprian Craciun.

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

[GENERAL] XML output & multiple SELECT queries

Dear PostgreSQL users,

I would like to ask a question about outputting data as XML. Say I have two
tables:

team(integer id, text name);
player_of_team(integer id, integer team_id, text name); (team_id is FK to
team.id)

I would like to query both tables to get following example XML output:

<team name="Real Madrid">
<players>
<name>Garcia</name>
<name>Robinho</name>
</players>
</team>

Is this possible in one query? I'm thinking about something like this, but I
haven't figured it out so far:

SELECT XMLElement(name team, XMLAttributes(name as name), SELECT XMLElement(name
players, XMLForest(name)) FROM player_of_team WHERE team_id = t.id) FROM team t
WHERE t.name = 'Real Madrid';

In other words, is it possible to nest multiple SELECT queries in the XML output
functions?

Thanks in advance. Kind regards,

Peter


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

[pgadmin-hackers] Comments on a separate tab?

Hi,

Properties dialog takes a lot of space. I think it's mainly because of
the comments textfield. I would find great to put it on its own tab. I
haven't actually look at the code to see if that's possible at all. I
would like to know your feelings about this.

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

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

Re: [GENERAL] Overloading



Ralph Smith wrote:
I never did get an answer to this.

I get:
ERROR:  cannot change return type of existing function
HINT:  Use DROP FUNCTION first.

********** Error **********

ERROR: cannot change return type of existing function
SQL state: 42P13
Hint: Use DROP FUNCTION first.


When I try to:

  CREATE OR REPLACE FUNCTION check_date_ymd(given_date varchar) RETURNS BOOLEAN  AS
and
  CREATE OR REPLACE FUNCTION check_date_ymd(given_date varchar, OUT isvalid boolean, OUT ryear int, OUT rmonth int, OUT rday int)  AS

I just spent a few hours on this today.  I wanted my function to return info in several columns.
When you specify OUT parameters like this, it's telling the function to return column names of "isvalid, ryear, rmonth, & rday" with the corresponding data types. If you DROP the existing function " DROP FUNCTION check_date_ymd(given_date varchar)" then you can run CREATE OR REPLACE FUNCTION. The following snippet is from the help file.

34.4.3. Functions with Output Parameters

An alternative way of describing a function's results is to define it with output parameters, as in this example:

CREATE FUNCTION add_em (IN x int, IN y int, OUT sum int) AS 'SELECT $1 + $2' LANGUAGE SQL;  SELECT add_em(3,7);  add_em --------      10 (1 row)

This is not essentially different from the version of add_em shown in Section 34.4.1, “SQL Functions on Base Types”. The real value of output parameters is that they provide a convenient way of defining functions that return several columns. For example,

CREATE FUNCTION sum_n_product (x int, y int, OUT sum int, OUT product int) AS 'SELECT $1 + $2, $1 * $2' LANGUAGE SQL;   SELECT * FROM sum_n_product(11,42);  sum | product -----+---------   53 |     462 (1 row)

What has essentially happened here is that we have created an anonymous composite type for the result of the function. The above example has the same end result as

CREATE TYPE sum_prod AS (sum int, product int);  CREATE FUNCTION sum_n_product (int, int) RETURNS sum_prod AS 'SELECT $1 + $2, $1 * $2' LANGUAGE SQL;
Using OUT params creates a different output type.

Hope this helps
Dennis

Re: [pgsql-www] Translated documentations

Hi,

Tatsuo Ishii a écrit :
> JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
> docs into Japanese and been distributing through their web site. The
> translation work is surprisingly fast, usually Japanese translated
> docs are uploaded no later than 1 week after PostgreSQL is
> released. Thanks those who are volunteering the work.
>

For minor and major releases, french translated docs are available the
same day PostgreSQL is released. It's not really a big deal for minor
releases. It's much more work for a major release, so we begin to work
on the translation when the first beta appears and we translate every
beta and RC release.

One major issue is the release.sgml file which is hard and tedious to
do. Last one aren't translated because it's too much work. I really need
to work on this.

> I think it would be nice that PostgreSQL main web site has the
> translated docs or has a link to them. Many open source projects do
> this way. This is not only usefull but good to appeal how the world
> wide PostgreSQL commnuities help each other.
>
> What do you think?

Having the translated one on the PostgreSQL main website would be a bit
hard because of the search functionality. I think a link would be simpler.

On the search functionality, I added it to the french translation web
site : it's really simple to do with the text search facility of
PostgreSQL 8.3.

Regards.


--
Guillaume.

http://www.postgresqlfr.org

http://dalibo.com

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

Friday, June 13, 2008

[pgsql-www] Translated documentations

Hi,

JPUG(Japan PostgreSQL Users Group) has been translating the PostgreSQL
docs into Japanese and been distributing through their web site. The
translation work is surprisingly fast, usually Japanese translated
docs are uploaded no later than 1 week after PostgreSQL is
released. Thanks those who are volunteering the work.

I think it would be nice that PostgreSQL main web site has the
translated docs or has a link to them. Many open source projects do
this way. This is not only usefull but good to appeal how the world
wide PostgreSQL commnuities help each other.

What do you think?
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

Joshua D. Drake wrote:
> Jonathan Fuerth wrote:
>> Hi again,
>
>> If the check itself fails for some reason (HTTP error, scrape fails to
>> find latest version, ...) then it will email a different configurable
>> list of people (especially me so I can fix it).
>>
>> So... who would like to be added to which list(s), and how frequently
>> should I run the check?
>
> pgsql-www, say --- once a month?

What would be cool is if it could track the version RSS feed from
www.postgresql.org to figure out when it needs to go out and check the
others...

//Magnus

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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

Jonathan Fuerth wrote:
> Hi again,

> If the check itself fails for some reason (HTTP error, scrape fails to
> find latest version, ...) then it will email a different configurable
> list of people (especially me so I can fix it).
>
> So... who would like to be added to which list(s), and how frequently
> should I run the check?

pgsql-www, say --- once a month?

Joshua D. Drake

P.S. Great work!

>
> -Jonathan
>


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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Saturday, June 14, 2008 00:04:05 -0400 Jonathan Fuerth
<fuerth@sqlpower.ca> wrote:

> Hi again,
>
> I've finished the version alerter. It finds the latest version number
> at http://www.postgresql.org/ftp/source/, then verifies that version
> number appears in a configurable list of web pages. It's easy to add
> new ones.
>
> Right now, I've got it up and running against the PostgreSQL entries
> on freshmeat, SourceForge, and Wikipedia.
>
> Here's what a notification looks like:
>
> ---
>
> From: daemon@(no spam please)
> To: fuerth@(no spam please)
> To: other@(no spam please)
> Subject: Version check alert!
> Date: Sat, 14 Jun 2008 00:34:39 -0400 (EDT)
>
> Latest version: 8.3.3
>
> freshmeat: needs update!
> SourceForge: up to date
> Wikipedia: up to date
>
> ---
>
> If all sites are up to date, no email is sent.
>
> If at least one site is out of date, an email like the above is sent
> to a configurable list of people.
>
> If the check itself fails for some reason (HTTP error, scrape fails to
> find latest version, ...) then it will email a different configurable
> list of people (especially me so I can fix it).
>
> So... who would like to be added to which list(s), and how frequently
> should I run the check?

Add me for freshmeat ...

Thx

- --
Marc G. Fournier Hub.Org Hosting Solutions S.A. (http://www.hub.org)
Email . scrappy@hub.org MSN . scrappy@hub.org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkhTRUEACgkQ4QvfyHIvDvO9awCgjcMBYby4ZItMz/grJeR/vGzu
wJIAoI8CPbIMwqhPuH37IVBaWLHCg2Je
=/uPm
-----END PGP SIGNATURE-----


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

Re: [pgsql-advocacy] PostgreSQL passes MySQL for Freshmeat Downloads

Hi again,

I've finished the version alerter. It finds the latest version number
at http://www.postgresql.org/ftp/source/, then verifies that version
number appears in a configurable list of web pages. It's easy to add
new ones.

Right now, I've got it up and running against the PostgreSQL entries
on freshmeat, SourceForge, and Wikipedia.

Here's what a notification looks like:

---

From: daemon@(no spam please)
To: fuerth@(no spam please)
To: other@(no spam please)
Subject: Version check alert!
Date: Sat, 14 Jun 2008 00:34:39 -0400 (EDT)

Latest version: 8.3.3

freshmeat: needs update!
SourceForge: up to date
Wikipedia: up to date

---

If all sites are up to date, no email is sent.

If at least one site is out of date, an email like the above is sent
to a configurable list of people.

If the check itself fails for some reason (HTTP error, scrape fails to
find latest version, ...) then it will email a different configurable
list of people (especially me so I can fix it).

So... who would like to be added to which list(s), and how frequently
should I run the check?

-Jonathan

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

Re: [pgsql-es-ayuda] Ayuda

2008/6/13 Esteban Carrascal Jimenez <esteban.carrascal@gmail.com>:
> Hola,
>
> Tengo un proceso que ejecuto para actualizar diariamente unas tablas, el
> problema es que ahora ultimo que intento ejecutar el proceso me envia este
> error:
>
> SQL Exception: Backend start-up failed: FATAL 1: cannot open pg_proc: No
> such file or directory
> .

podemos ver el error que bota postgres? el que muestras es el del JDBC...
no has borrado nada del servidor? ejecutas vacuum regularmente?
que version de postgres es esta?


--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net

Re: [GENERAL] Overloading

On Fri, Jun 13, 2008 at 06:11:43PM -0700, Ralph Smith wrote:

> I get:
> ERROR: cannot change return type of existing function
> HINT: Use DROP FUNCTION first.

Don't use CREATE OR REPLACE for the second one. The OR REPLACE is
trying to replace a function of the same name.

A

--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

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

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

On Fri, Jun 13, 2008 at 08:51:19PM +0100, Simon Riggs wrote:

> The best of both ideas would be to have an option inside pg_hab.conf to
> indicate when lookup occurs. Some parts of a network are static, others
> are not, so a global option would not be useful.

We would point and laugh at people who thought that something was
"static" inside PostgreSQL, and depended on that for something
critical without some pretty heavy-duty locks. Are we really
proposing to offer an authentication mechanism that depends on
something as flimsy as hostname lookups in the DNS, and then not
insist that the bare minimum of integrity check ("I checked this DNS
lookup at connection time") is the rule?

DNS is a distributed database. Surely the least we can demand is that
the lookup happen when the naive think it will (i.e., at the time the
connection from that hostname happens).

> If the user knows a portion of their network is static,

If there were the slightest evidence that users historically believed
in such "knowledge" correctly, then I might have some sympathy for
this. The fact is that DNS (at least without DNSSEC) is one of the
areas in which sysadmins have the worst record of trust to this day.
I think we'd be fools to encourage such trust. If you don't look up
at _least_ at connection time, this feature should be rejected on the
grounds that it opens a new authentication hole a mile wide.

A

--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

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

[GENERAL] Overloading

I never did get an answer to this.

I get:
ERROR:  cannot change return type of existing function
HINT:  Use DROP FUNCTION first.

********** Error **********

ERROR: cannot change return type of existing function
SQL state: 42P13
Hint: Use DROP FUNCTION first.


When I try to:

  CREATE OR REPLACE FUNCTION check_date_ymd(given_date varchar) RETURNS BOOLEAN  AS
and
  CREATE OR REPLACE FUNCTION check_date_ymd(given_date varchar, OUT isvalid boolean, OUT ryear int, OUT rmonth int, OUT rday int)  AS

I wanted to an 'is it valid' version, and another that would save runtime by also returning values that would speed up the
function date_to_utime().

in pg_proc there is no 'check_date_ymd', so there is no 'collision'.

Can someone elucidate me on this?

Thanks!
Ralph



Re: [HACKERS] Options for protocol level cursors

On Jun 13, 2008, at 4:40 PM, Kris Jurka wrote:
> The JDBC driver would also like this ability, but a GUC is a pretty
> ugly hack.

I completely agree that it is an ugly hack. :)

> Also, since you still have to go to the SQL level to issue the MOVE
> or FETCH BACKWARD, you're still not all the way there to a full
> protocol solution.

Completely true. However, this is, of course, only pertinent to SCROLL
cursors.

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

[pgsql-es-ayuda] Ayuda

Hola,

Tengo un proceso que ejecuto para actualizar diariamente unas tablas, el problema es que ahora ultimo que intento ejecutar el proceso me envia este error:

SQL Exception: Backend start-up failed: FATAL 1:  cannot open pg_proc: No such file or directory
.
org.postgresql.util.PSQLException: Backend start-up failed: FATAL 1:  cannot open pg_proc: No such file or directory

Por favor alguien me puede ayudar con esto

Gracias

Re: [HACKERS] Proposal: Multiversion page api (inplace upgrade)

Bruce Momjian napsal(a):
> Heikki Linnakangas wrote:
>> Zdenek Kotala wrote:
>>> 4) Implementation
>>>
>>> The main point of implementation is to have several version of
>>> PageHeader structure (e.g. PageHeader_04, PageHeader_03 ...) and correct
>>> structure will be handled in special branch (see examples).
>> (this won't come as a surprise as we talked about this in PGCon, but) I
>> think we should rather convert the page structure to new format in
>> ReadBuffer the first time a page is read in. That would keep the changes
>> a lot more isolated.
>>
>> Note that you need to handle not only page header changes, but changes
>> to internal representations of different data types, and changes like
>> varvarlen and combocid. Those are things that have happened in the past;
>> in the future, I'm foreseeing changes to the toast header, for example,
>> as there's been a lot of ideas related to toast options compression.
>
> I understand the goal of having good modularity (not having ReadBuffer
> modify the page), but I am worried that doing multi-version page
> processing in a modular way is going to spread version-specific
> information all over the backend code, making is harder to understand.

I don't think so. Page already contains page version information inside and
currently we have macros like PageSetLSN. Caller needn't know nothing about
PageHeader representation. It is responsibility of page API to correctly handle
multi version.

The same we can use for tuple access. It is more complicated but I think it is
possible. Currently we several macros (e.g. HeapTupleGetOid) which works on
TupleData structure. "Only" what we need is extend this API as well.

I think in final we will get more readable code.

Zdenek


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

[BUGS] Purge Oid

Hallo,

 

I’ve a problem with postgress 8.1,

 

Db_data FS is full because file oid are too large, how I can delete old OID file without to risk to damage oid relation database

 

 

 

 

Thks

 

 

Alessandro

 

Internet Email Confidentiality Footer

********************************************************************************************************************************************

La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
********************************************************************************************************************************************

Fwd: [pgsql-es-ayuda] Copia y restauracion de base de datos de GForge

Para crear la copia de la bbdd lo he hecho con pg_dump:
pg_dump -c -v -f $ARCHIVEROOT/$INCREMENTDIR/$BACKUP_BBDD -U $USERNAME $DBNAME
Y para restaurarla, con:
psql -f $ARCHIVEROOT/$INCREMENTDIR/$BACKUP_BBDD -d $DBNAME -U $USERNAME

Pero nada, me sigue dando errores

Algunos errores al restaurarlo (me da muchos):
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32134:
ERROR: error de sintaxis en o cerca de «1» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32134:
LINEA 1: 1 project 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32134:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32137:
comando \. no válido
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32146:
ERROR: error de sintaxis en o cerca de «1» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32146:
LINEA 1: 1 Bash /bin/bash
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32146:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:32147:
comando \N no válido
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:36138:
ERROR: error de sintaxis en o cerca de «100» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:36138:
LINEA 1: 100 none root@localhost.localdomain 2 2006-06-12
17:37:11....
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:36138:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30911:
comando \nEnviado no válido
El búfer de consulta ha sido reiniciado (limpiado).
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30912:
comando \n no válido
El búfer de consulta ha sido reiniciado (limpiado).
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30914:
comando \n no válido
El búfer de consulta ha sido reiniciado (limpiado).
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30916:
comando \n no válido
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «209» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: 209 102 105 2008-06-02 17:19:27.750892+02 No está resuelta
h...
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «collect» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: collect digits&quot;
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «.» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: . Si AES detecta el collect digits antes de finalizar la
tra...
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «no» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: no es posible realizar transfer&quot;
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «.» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: . Se ha puesto un wait time de 5seg en este vector y le da
t...
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
^
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
ERROR: error de sintaxis en o cerca de «soltar» en el carácter 1
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:
LINEA 1: soltar&quot;
psql:/backup/diarias/GForge/backup_13-06-2008/bbdd_GForge_13-06-2008.sql:30920:


Linea 32134:
CREATE OPERATOR >= (
PROCEDURE = tsvector_ge,
LEFTARG = tsvector,
RIGHTARG = tsvector,
COMMUTATOR = <=,
NEGATOR = <,
RESTRICT = contsel,
JOIN = contjoinsel
);


ALTER OPERATOR public.>= (tsvector, tsvector) OWNER TO postgres;

Linea 32146:
CREATE TABLE tracker_my_queue (
user_id integer NOT NULL,
tracker_item_id integer NOT NULL,
sort_order integer DEFAULT 0
);


ALTER TABLE public.tracker_my_queue OWNER TO gforge;

Linea 30920:
500 2008-06-04 13:28:39.184073+02 105 trackeritem 146
assignee Nombre Ejemplo None

Esto está dentro de:
COPY audit_trail (audit_trail_id, change_date, user_id, section,
ref_id, field_name, new_value, old_value) FROM stdin;


En teoría, al crear una copia de la bbdd, y al restaurarla, no tendría
que dar ningún error, y los dá...

No entiendo nada, si la bbdd está creada y con esos datos....

2008/6/11, Alvaro Herrera <alvherre@commandprompt.com>:
> Clemente López Giner escribió:
>
>> Me da errores de privilegios y relaciones, no puede dar privilegios y
>> algunas relaciones dice que no existen (o que ya existían), cuando
>> debería de volver a crear todo de nuevo, sin importar lo anterior.
>
> Si quieres que cree todo de nuevo, usa --clean.
>
> Para respaldar los roles existentes, usa pg_dumpall -g (supongo que
> deberias restaurar esto antes de intentar restaurar cualquier otra
> cosa).
>
> --
> Alvaro Herrera

http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
--
TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda

Re: [HACKERS] a problem when poring from Oracle's PL/SQL to PLPGSQL

billy schrieb:
> pgsql-hackers:
>
> The following is Oracle's PL/SQL
>
> if resTypeTableName is null
> then
> queryStr := 'select IntIID, Path FROM aaResourceData' || ' where ResType=''' || srcType || ''' and ResID=''' || srcID || '''';
> else queryStr := 'select IntIID, Path FROM ' || resTypeTableName || ' where ResType=''' || srcType || ''' and ResID=''' ||
> srcID || '''';
> end if;
>
> open cursorSrc for queryStr;
>
>
> Here queryStr is a variable which type is TEXT OR VARCHAR or other string types.
>
> But in PLPGSQL, we can only open a cursor this way:
>
> open cursorSrc for select * from testtable;
>
> We cannot substitude "select * from testtable" with a variable.
>
> Is there another way to handle it?
>
> Thank you for your help. :-)
>
open cursorSrc for execute queryStr; should work fine

Regards
Mario Weilguni


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

[HACKERS] a problem when poring from Oracle's PL/SQL to PLPGSQL

pgsql-hackers:

The following is Oracle's PL/SQL

if resTypeTableName is null
then
queryStr := 'select IntIID, Path FROM aaResourceData' || ' where ResType=''' || srcType || ''' and ResID=''' || srcID || '''';
else queryStr := 'select IntIID, Path FROM ' || resTypeTableName || ' where ResType=''' || srcType || ''' and ResID=''' ||
srcID || '''';
end if;

open cursorSrc for queryStr;


Here queryStr is a variable which type is TEXT OR VARCHAR or other string types.

But in PLPGSQL, we can only open a cursor this way:

open cursorSrc for select * from testtable;

We cannot substitude "select * from testtable" with a variable.

Is there another way to handle it?

Thank you for your help. :-)


        billy
        billywq@163.com
          2008-06-13


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

[HACKERS] pg_stat_statements

Hello,

Postgres 8.4 has pg_stat_user_functions view to track number of calls of
stored functions and time spent in them. Then, I'm thinking a "sql statement"
version of similar view -- pg_stat_statements.

Prepared statements and statements using extended protocol are grouped
by their sql strings without parameters, that is the just same as
pg_stat_user_functions. We could ignore simple queries with parameters
because they have different expression for each execution.

We can write sql statements in server logs and gather them using some tools
(pgfouine and pqa) even now, but statement logging has unignorable overhead.
Lightweight view is useful for typical users who are only interedted in
aggregated results.


One issue is how and where to store sql strings. We could use hash values
of statement strings as short identifiers, but we need to store sql strings
somewhere to compare the IDs and original statements.

1. Store SQLs in shared memory
We need to allocate fixed region on starting servers. Should we have
another memory setting into postgresql.conf?

2. Store SQLs in stats collector process's memory
We can use dynamically allocated memory, but sending sql statements to
stat collector process is probably slow and stat file will be large.

I'm not sure which is better. It might have relevance to discussion of
shared prepared statements.


Another issue is that we could implement the feature as an add-on,
not a core feature. We can use general hooks for this purpose; We store
sql statement and their hash values in planner_hook, and record number
of execution and time in new executor begin/end hooks or by adding
a "stop-watch" executor node. Should this feature be in the core or not?
For example, dynamic shared memory allocation might be need before we move
the feature in the core.

Comments and suggestions welcome.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


--
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: Multiversion page api (inplace upgrade)

Ron Mayer napsal(a):
> Tom Lane wrote:
>> Another issue is that it might not be possible to update a page for
>> lack of space. Are we prepared to assume that there will never be a
>> transformation we need to apply that makes the data bigger? In such a
>> situation an in-place update might be impossible, and that certainly
>> takes it outside the bounds of what ReadBuffer can be expected to manage.
>
> Would a possible solution to this be that you could
>

<snip>

>
> 2. Run some new maintenance command like "vacuum expand" or
> "vacuum prepare_for_upgrade" or something that would split
> any too-full pages, leaving only pages with enough space.

It does not solve problems for example with TOAST tables. If chunks does not fit
on a new page layout one of the chunk tuple have to be moved to free page. It
means you get a lot of pages with ~2kB of free unused space. And if max chunk
size is different between version you got another problem as well.

There is also idea to change compression algorithm for 8.4 (or offer more
varinats). It also mean that you need to understand old algorithm in a new
version or you need to repack everything on old version.


Zdenek

--
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] [torontopug] New User Groups: Toronto, Oklahoma

On Thu, Jun 12, 2008 at 3:45 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Magnus Hagander escribió:
>
>> I think I saw a commit come through from Alvaro that should make the
>> archives work automatically as well. Everything on the website is driven
>> from the database since a couple of months back.
>
> Sorry, that was a first step, but more work is needed.

OK, so I've added both to index.php and includes/top_config.php, as
per the old days :-p

The individual index pages for each pug seem to have been created
automagically now.

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

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

Re: [pgsql-advocacy] PostgreSQL derivatives

On Fri, Jun 13, 2008 at 8:21 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On Thu, 2008-06-12 at 13:26 -0700, Joshua D. Drake wrote:
>> On Thu, 2008-06-12 at 21:21 +0100, Simon Riggs wrote:
>> > On Thu, 2008-06-12 at 10:42 +0200, Magnus Hagander wrote:
>> > > Dave Page wrote:
>>
>> > I do. Non-profit organisations must be run "without fear or favour"
>> and
>>
>> Well PostgreSQL.Org is not a non profit organization
>
> That is news to me. Who gets the financial profits then? Why are we
> registering in various countries as a non-profit?

postgresql.org isn't, and never has registered as a non-profit. We
have individual user groups that are registering themselves around the
world, but they are organised independently of postgresql.org, though
obviously there is overlap in the people involved and mission etc.

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

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

Re: [pgsql-es-ayuda] Opcion TABLESPACE al crear una tabla.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>
> Has hecho el intento para ver que ocurre? o solo "prefieres evitar la fatiga"?
>

Es que no se como ver en que tablespace se crea la tabla. Por eso he
preguntado, de lo contrario me habría molestado en mirarlo yo mismo sin
molestar a la lista.

¿Sabrías como se puede ver en que tablespace se ha creado?.
- --


< ¡¡Nos vemos!! >
----------------------------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIUiG5K7lGsMchFswRAg6jAJ42HxQoSWqAZxm4K4U3RUXei0VIJQCeJ8gd
xb0AuWI1k5XzjMglr9BquqA=
=RlD6
-----END PGP SIGNATURE-----
--
TIP 10: no uses HTML en tu pregunta, seguro que quien responda no podrá leerlo

Re: [pgsql-advocacy] PostgreSQL derivatives

On Thu, 2008-06-12 at 13:26 -0700, Joshua D. Drake wrote:
> On Thu, 2008-06-12 at 21:21 +0100, Simon Riggs wrote:
> > On Thu, 2008-06-12 at 10:42 +0200, Magnus Hagander wrote:
> > > Dave Page wrote:
>
> > I do. Non-profit organisations must be run "without fear or favour"
> and
>
> Well PostgreSQL.Org is not a non profit organization

That is news to me. Who gets the financial profits then? Why are we
registering in various countries as a non-profit?

--
Simon Riggs

www.2ndQuadrant.com

PostgreSQL Training, Services and Support


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

Re: [pgsql-advocacy] PostgreSQL derivatives

On Thu, 2008-06-12 at 22:31 -0400, Bruce Momjian wrote:
> Simon Riggs wrote:
> > > And in the end, I don't see any reason for us to *turn down* sponsorship
> >
> > I do. Non-profit organisations must be run "without fear or favour" and
> > that includes not accepting gifts of any kind, though anonymous
> > donations are always acceptable.
> >
> > If we don't do this, then people may get the impression that certain
> > companies dominate and that can easily lead to non-contribution. So
> > IMHO, being even handed is critically important to our future.
>
> I am not sure how anonymous-only contributions are supposed to work.
> EnterpriseDB employs me, but no one is supposed to know that?
> EnterpriseDB sponsors a dinner at PGCon but the sponsor is a secret?
>
> We can do anonymous-only contributions, but that is going to certainly
> limit contributions. I am not sure how a company contribution will be
> explained to the accounting staff if it has to be anonymous.
>
> I think the big question is what are anonymous-only contributions trying
> to solve? I have never heard of problems of favortism to contributors,
> so why take a hit on contributions to avoid something no one has
> reported to have happened?

I'm expressing a clear principle. I don't see this principle as being
hard to implement. "Peace talks, sponsored by Group X", will be unlikely
to bring the other party to the table.

I want to demonstrate a level playing field, so that all feel welcome to
contribute. I am worried that if things get out of balance then it will
go badly for us in the future. Unfortunately, those are principles, not
clear guidelines, so yes, what I have asked for raises many questions.

--
Simon Riggs

www.2ndQuadrant.com

PostgreSQL Training, Services and Support


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

Re: [pgsql-it-generale] to_tsvector: errori nella configurazione italiana

Ciao Federico,

rotellaro@gmail.com ha scritto:
> Il database su cui stai operando suppongo sia UTF8.
> Sarebbe interessante capire come sono caricati questi dati e
> l'encoding dell'eventuale database di origine.

Sì. Più informazioni hai e meglio è.

> Ad ogni modo prova la seguente procedura.
> Esporta il database di origine con pg_dump passandogli l'opzione
> --encoding=UTF8.
> Converti il dump in utf8 con iconv
> http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html
> e caricalo in un altro database creato esplicitamente in UTF8.

Può essere senz'altro una idea. Sempre che il problema non sia nelle
stop word. Sono interessato a sapere che PG usa sul suo Mac Giorgio. Non
vorrei fosse un problema limitato a questo OS e all'eventuale pacchetto
usato.

Ciao,
Gabriele

--
Gabriele Bartolini: Open source programmer and data architect
Current Location: Prato, Tuscany, Italy
Associazione Italian PostgreSQL Users Group: www.itpug.org
gabriele.bartolini@gmail.com | www.gabrielebartolini.it
"If I had been born ugly, you would never have heard of Pelé", George Best
http://www.linkedin.com/in/gbartolini

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

Re: [pgsql-it-generale] to_tsvector: errori nella configurazione italiana

Ciao Giorgio,

benvenuto. :)

Potresti inviare alcune informazioni quali:

1) encoding del database
2) encoding di default del server ('show server encoding')
3) encoding del client ('show client encoding')

Inoltre, che versione di PostgreSQL usi? L'hai ricompilata te con
macports oppure usi un pacchetto particolare?

>>> ERROR: invalid byte sequence for encoding "UTF8": 0xc3
>>> HINT: This error can also happen if the byte sequence does not match
>>> the encoding expected by the server, which is controlled by
>>> "client_encoding".

Il carattere di controllo 0xC3 indica infatti una sequenza multibyte
UTF8. Sembra davvero che testo non UTF8 sia letto in modalità UTF8.

Ciao,
Gabriele
--
Gabriele Bartolini: Open source programmer and data architect
Current Location: Prato, Tuscany, Italy
Associazione Italian PostgreSQL Users Group: www.itpug.org
gabriele.bartolini@gmail.com | www.gabrielebartolini.it
"If I had been born ugly, you would never have heard of Pelé", George Best
http://www.linkedin.com/in/gbartolini

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

Re: [pgsql-it-generale] to_tsvector: errori nella configurazione italiana

2008/6/13 Giorgio Valoti <giorgio_v@mac.com>:
> Ciao a tutti, riposto qui questa mia richiesta su pgsql-general che non ha
> avuto risposta. Avendo scoperto solo ora che esiste anche una mailing list
> italiana ho pensato che forse c'era qualcuno che poteva darmi qualche
> suggerimento. Ho una discreta esperienza con pgsql ma non ho mai usato la
> ricerca full-text per cui sono un po' perso.
> Mi scuso in anticipo per non aver ritradotto il messaggio ma penso sarà
> sufficientemente chiaro:
>
snip!
dimenticavo la cosa piu' banale.
Prima del test che ti ho indicato prova a lanciare la select dopo aver dato un:
set CLIENT_ENCODING='UTF8';

Riciao
Fede

--
(all opinions expressed are my own)
Federico Campoli
PostgreSQL Consulting -> PGHost http://www.pghost.eu

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