Re: [GENERAL] Dollaw sign quoting disabled

2006-11-25 Thread A. Kretschmer
am  Wed, dem 22.11.2006, um 16:34:02 -0800 mailte snappingturtle folgendes:
 It appears that in my installation of Postgres that dollaw sign quoting
 is disabled.  For example, the following command returns an error:
 
  CREATE or replace FUNCTION add_em(int, int) RETURNS integer AS $$
  SELECT $1 + $2;
  $$ LANGUAGE SQL;

It works for me without any errors, but are you sure that you have at
least version 8.0? The dollar-quoting - feature will only work with 8.x
and higher.

Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: - Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Ritesh Nadhani

Hello all

Let me introduce myself first. I am the ex-lead developer of SQLyog
(one  of the most popular GUI for MySQL which is Windows only and runs
on  Linux through WINE, more info at http://www.webyog.com).

===
New Project: wxWidgets based cross-platform GUI for Open Source databases
===

===
Motivation
===

I have recently shifted to US to study for MS (and hopefully PhD in Univ
of Iowa). I have also shifted to Mac OS X as my primary usage machine
(after lifetime of Windows devotion).

As part of my coursework, I work with MySQL and PostgreSQL
extensively. I searched but couldnt find any GUI which has similar
power like SQLyog by any means. I have tried (and have tried before
also) various GUIs for respective databases but somehow the features
in them are restrictive and are not powerful enough for developers
like me who writes lots of SQL queries and needs to get things done
fast.

We can say that we already have enough GUIs for all open source
databases (open source as well as commercial) available in the market
but are they powerful enough to suffice the needs of an experienced
SQL developer as well as newbies. The top three problems with existing
GUI managers are:

- Most of the usable/powerful GUIs are not open source which is one of
the most powerful motivation for us to look for an alternate solutions.

- 90% of such GUIs are DB specific. It becomes very hard for developers
who work with multiple DBs as part of their work. It forces them to
learn different user interface/softwares to work with the respective
databases.

- Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
layer to connect and work with the databases and JAVA or some other kind
of high level toolkit/language to develop the GUI. This results in
applications being bulky and slow and never able to provide the speed
that a low level C/C++ client API provide and are supported by all of
the standard databases.

A simple to use GUI for all databases
===

The basic idea behind such a GUI is to develop a small footprint,
extremely fast, multilingual, cross platform administrator/development
tool for databases. One of the basic requirements thats this GUI will
fulfill is to allow a developer to efficiently execute/plan queries and
allow an administrator to quickly do jobs like backups/restores etc.
with fewest mouse clicks and across different databases.

Once the basic architecture has been set, I plan to extend it to support
advanced features like MS Access like form development, query builder,
scheduled backups, data synchronization, configuration management,
replication manager, user manager etc.

wxWidgets
===

Since last couple of years, wxWidgets (formerly wxWindows) has
transformed itself into a highly powerful cross-platform GUI library
which when compiled gives the native look and feel of the host operating
system. This is something which other libraries like Qt, JAVA lack.

More info about wxwidgets can be found at: http://www.wxwidgets.org.


Yet unnamed DB management environment
===

I dont have the time nor the resources to do everything by myself. As I
see, there are too many things which are best distributed among
people/developers who are good at those specific things. E.g. I will
require good graphics designer to develop the icons for the tool, web
developer to keep the website updated, db specific veterans to best code
individual db management code etc.

Also, it would be a great way to learn some programming and show it as
part of your undergraduate/graduate project development requirement  :)

Is it viable?
===

I am not too big a fan of reinventing the wheel or work on a project
which will go bust in couple of years? So what I want is from you people
a little initial idea and discussion about such a tool. Is it viable? Is
it OK to develop such a tool? Will people use it?

I am cross posting this to various db mailing lists as well as relevant
newsgroups to get maximum idea about it. You can also contact me
directly at [EMAIL PROTECTED] if you would be interested.

Waiting for your comments.

-- Ritesh

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Thomas Kellerer

- Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
layer to connect and work with the databases and JAVA or some other kind
of high level toolkit/language to develop the GUI. This results in
applications being bulky and slow and never able to provide the speed
that a low level C/C++ client API provide and are supported by all of
the standard databases.


I am maintaining such an application and it is neither bulky nor slow. It's all 
a matter of implementation.


Just an example: with the enhanced batching in Oracle's current JDBC driver 
(yes, I know this is an Oracle list) I can even achieve the same import speed as 
SQL*Loader when importing flat files.


Btw: coming from a Java world, I do consider HSQLDB and Derby belonging to the 
list of standard databases


Thomas


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Tomi NA

2006/11/25, Ritesh Nadhani [EMAIL PROTECTED]:

 Hello all

Let me introduce myself first. I am the ex-lead developer of SQLyog
(one  of the most popular GUI for MySQL which is Windows only and runs
on  Linux through WINE, more info at http://www.webyog.com).

===
New Project: wxWidgets based cross-platform GUI for Open Source databases
===

===
Motivation
===

I have recently shifted to US to study for MS (and hopefully PhD in Univ
of Iowa). I have also shifted to Mac OS X as my primary usage machine
(after lifetime of Windows devotion).

As part of my coursework, I work with MySQL and PostgreSQL
extensively. I searched but couldnt find any GUI which has similar
power like SQLyog by any means. I have tried (and have tried before
also) various GUIs for respective databases but somehow the features
in them are restrictive and are not powerful enough for developers
like me who writes lots of SQL queries and needs to get things done
fast.

We can say that we already have enough GUIs for all open source
databases (open source as well as commercial) available in the market
but are they powerful enough to suffice the needs of an experienced
SQL developer as well as newbies. The top three problems with existing
GUI managers are:

- Most of the usable/powerful GUIs are not open source which is one of
the most powerful motivation for us to look for an alternate solutions.

- 90% of such GUIs are DB specific. It becomes very hard for developers
who work with multiple DBs as part of their work. It forces them to
learn different user interface/softwares to work with the respective
databases.

- Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
layer to connect and work with the databases and JAVA or some other kind
of high level toolkit/language to develop the GUI. This results in
applications being bulky and slow and never able to provide the speed
that a low level C/C++ client API provide and are supported by all of
the standard databases.

A simple to use GUI for all databases
===

The basic idea behind such a GUI is to develop a small footprint,
extremely fast, multilingual, cross platform administrator/development
tool for databases. One of the basic requirements thats this GUI will
fulfill is to allow a developer to efficiently execute/plan queries and
allow an administrator to quickly do jobs like backups/restores etc.
with fewest mouse clicks and across different databases.

Once the basic architecture has been set, I plan to extend it to support
advanced features like MS Access like form development, query builder,
scheduled backups, data synchronization, configuration management,
replication manager, user manager etc.

wxWidgets
===

Since last couple of years, wxWidgets (formerly wxWindows) has
transformed itself into a highly powerful cross-platform GUI library
which when compiled gives the native look and feel of the host operating
system. This is something which other libraries like Qt, JAVA lack.

More info about wxwidgets can be found at: http://www.wxwidgets.org.


Yet unnamed DB management environment
===

I dont have the time nor the resources to do everything by myself. As I
see, there are too many things which are best distributed among
people/developers who are good at those specific things. E.g. I will
require good graphics designer to develop the icons for the tool, web
developer to keep the website updated, db specific veterans to best code
individual db management code etc.

Also, it would be a great way to learn some programming and show it as
part of your undergraduate/graduate project development requirement  :)

Is it viable?
===

I am not too big a fan of reinventing the wheel or work on a project
which will go bust in couple of years? So what I want is from you people
a little initial idea and discussion about such a tool. Is it viable? Is
it OK to develop such a tool? Will people use it?

I am cross posting this to various db mailing lists as well as relevant
newsgroups to get maximum idea about it. You can also contact me
directly at [EMAIL PROTECTED] if you would be interested.

Waiting for your comments.

-- Ritesh

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq



The generalities of the project make sense to me: there really isn't a
very good tool that is cross-platform, cross-database and has a lot of
advanced options.
The feature list of sqlyog is rather comprehensive, although I think
that the missing relationship diagram editor leaves an obvious gap in
the company of the other advanced features.
Do I have time to contribute to the project? Depends. I don't have
time to hack the source, but do have a lot of advice to offer (what
people call consulting and usually charge a hefty sum for :)).
I don't think you'll like/agree with the bulk of my advice, though.

First of all, I'm sure that wxWidgets and also Qt and GTK+ are all
very nice 

Re: [GENERAL] indexes

2006-11-25 Thread Tom Allison

Ben wrote:
Yes, it does. So of course it depends on how you use it to know what's 
going to be more efficient. For instance, if the rows in this table 
contain strings of more than a few bytes, and more than a couple tables 
reference this table with a foreign key, then you will quickly start to 
save space by using a numeric primary key, even if it is an artificial 
construct.


For the kind of work I find myself doing, it's rare that it would be 
more efficient to not have the artificial construct. But that doesn't 
mean one is always better than the other.




So let me see if I understand this correctly.

If the real-world primary key is large (say up to 100 characters in length) then 
the disadvantage is that you are duplicating this referenced key in several 
other tables, each element taking up 100 characters.  Space is wasted when 
compared to int4 ID's.  But not really sure if this is a performance problem for 
SELECT except for the space required (varchar(128) vs. int4).


Having two keys, a primary_key of int4 and a unique key of varchar(128) would be 
very ugly on INSERT/DELETE/UPDATE queries because of the index overhead.



One table may have rows on the order of 100's.
Another table will be 1,000,000.
The many-to-many join would be..  100,000,000's
And maybe there I would have need for smaller physical index variable types...

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org/


Re: [GENERAL] indexes

2006-11-25 Thread Harald Armin Massa

Tom,

If the real-world primary key is large (say up to 100 characters in length)

then
the disadvantage is that you are duplicating this referenced key in
several
other tables, each element taking up 100 characters.  Space is wasted when
compared to int4 ID's.  But not really sure if this is a performance
problem for
SELECT except for the space required (varchar(128) vs. int4).



What is worth a try is to check an md5 or sha hash of those 100chars and use
that as a key.

with a proper hashing algorythm (proper= fitting to your data) collisions
should not happen; and you have a shorter key to connect the tables.

best wishes

harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Richard Troy

Hi Ritesh,

I'm in support of Tomi's comments (especially those about consulting), and
have a few more thoughts to add. To wit:

First, as an aside, as I didn't know anything about SQLyog, I read your
post first, then went to the URL cited. Throughout your post, it wasn't
clear what the subject was exactly as it seemed you were talking in some
places about a database management interface and in other places some kind
of development environment for people to create cross-platform GUIs in. As
you expand your search for volunteers, you might consider making this more
clear - I'm sure I'm not the only one who doesn't/didn't know what SQLyog
is...

On Sat, 25 Nov 2006, Ritesh Nadhani wrote:

  Hello all

 Let me introduce myself first. I am the ex-lead developer of SQLyog
 (one  of the most popular GUI for MySQL which is Windows only and runs
 on  Linux through WINE, more info at http://www.webyog.com).

 ===
 New Project: wxWidgets based cross-platform GUI for Open Source databases
 ===

 ===
 Motivation
 ===

 I have recently shifted to US to study for MS (and hopefully PhD in Univ
 of Iowa). I have also shifted to Mac OS X as my primary usage machine
 (after lifetime of Windows devotion).

 As part of my coursework, I work with MySQL and PostgreSQL
 extensively. I searched but couldnt find any GUI which has similar
 power like SQLyog by any means. I have tried (and have tried before
 also) various GUIs for respective databases but somehow the features
 in them are restrictive and are not powerful enough for developers
 like me who writes lots of SQL queries and needs to get things done
 fast.

 We can say that we already have enough GUIs for all open source
 databases (open source as well as commercial) available in the market
 but are they powerful enough to suffice the needs of an experienced
 SQL developer as well as newbies. The top three problems with existing
 GUI managers are:

 - Most of the usable/powerful GUIs are not open source which is one of
 the most powerful motivation for us to look for an alternate solutions.

 - 90% of such GUIs are DB specific. It becomes very hard for developers
 who work with multiple DBs as part of their work. It forces them to
 learn different user interface/softwares to work with the respective
 databases.

A few thoughts here; each db engine has its own;

- sql dialect, dispite the best efforts of SQL92 et al.

- sql query plan output mechanism and format

- naming restrictions (some know from context what table/attribute names
are while others absolutely demand reserved-words remain reserved, even
when they'll never be found in a particular context) - presuming you want
to provide, works here but not there advice.

- system catalogs

- index structures

- transaction log semantics

- lock management - presuming you wish to include a which transaction has
the lock functionality

- activity/error/security log systems - presuming you wish to provide
error resolution assistance

- maintenance tools suite, like Postgres' vacuum

- backup and recovery suite


 - Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
 layer to connect and work with the databases and JAVA or some other kind
 of high level toolkit/language to develop the GUI. This results in
 applications being bulky and slow and never able to provide the speed
 that a low level C/C++ client API provide and are supported by all of
 the standard databases.

The reason - a reason - JDBC (and I presume ODBC) is so popular for these
purposes is that it helps resolve a handful - a large handful - of the
challenges of writing cross-database-platform.


 A simple to use GUI for all databases
 ===

 The basic idea behind such a GUI is to develop a small footprint,
 extremely fast, multilingual, cross platform administrator/development
 tool for databases. One of the basic requirements thats this GUI will
 fulfill is to allow a developer to efficiently execute/plan queries and
 allow an administrator to quickly do jobs like backups/restores etc.
 with fewest mouse clicks and across different databases.

 Once the basic architecture has been set, I plan to extend it to support
 advanced features like MS Access like form development, query builder,
 scheduled backups, data synchronization, configuration management,
 replication manager, user manager etc.

...This is where your stated goals become confusing; What does MS Access
have anything to do with this subject? When you say data synchronization,
do you mean replication - then why mention it separately? (rhetorical
questions)


 wxWidgets
 ===

 Since last couple of years, wxWidgets (formerly wxWindows) has
 transformed itself into a highly powerful cross-platform GUI library
 which when compiled gives the native look and feel of the host operating
 system. This is something which other libraries like Qt, JAVA lack.

 More info about wxwidgets can be found at: http://www.wxwidgets.org.


 Yet unnamed DB management environment
 ===

 I dont have 

Re: [GENERAL] indexes

2006-11-25 Thread Martijn van Oosterhout
On Sat, Nov 25, 2006 at 12:14:11PM -0500, Tom Allison wrote:
 If the real-world primary key is large (say up to 100 characters in length) 
 then the disadvantage is that you are duplicating this referenced key in 
 several other tables, each element taking up 100 characters.  Space is 
 wasted when compared to int4 ID's.  But not really sure if this is a 
 performance problem for SELECT except for the space required (varchar(128) 
 vs. int4).

Well, it kinda sucks for joining because comparing strings may take
tens to hundreds of times as long as compairng integers. It's not just
byte-wise comparison but you have to be locale sensetive about it.

My main problem with using any kind of string as natural key is that
once you start passing it around you have worry about the encoding of
said string and when it goes a round-trip to a client, will what you
get back still be the same? If you can guarentee ASCII you might be ok,
but otherwise... Integers have none of these issues.

 Having two keys, a primary_key of int4 and a unique key of varchar(128) 
 would be very ugly on INSERT/DELETE/UPDATE queries because of the index 
 overhead.

In general my tables are queried several orders of magnitude more often
than they are updated, so index update cost isn't all that relevent.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


[GENERAL] which version? old user coming back....

2006-11-25 Thread developer
I use to use postgres quite a bit but have been working on a project for a
couple years that does not use it.  I have finally convinced them to make
the switch after our current database hsqldb couldn't keep up with the
task.

So, for this project I will need postgres working on a debian server
(2.4.x), a centos 4 (2.6x) server and windows boxes for development. 
Since I last used postgres it appears that it has become windows friendly.
Hurray at least for the developers.  I have looked and it appears that
both the apt(debian) and yum (centos) repositories are living in the past
with version 7.5x.  Clearly the windows users will want to use 8+.  So
what do i do?

What do you recommend?

1)Do I run these old versions on my linux servers and the new version 8.1x
for development?  If I do this will I have to constantly battle
compatibility issues when going from development to the production
servers?  Will it be a big headache?  Will I be missing out on major
performance or features?


2)Is there a reliable way to install 8.1x on debian and centos using apt
and yum?


3)Should I just compile from source on the linux boxes?  Should I expect
any problems with this even on the old 2.4 kernel?  I would rather avoid
this cause I really like letting apt and yum maintain my compatibility
issues?

thanks everyone


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] which version? old user coming back....

2006-11-25 Thread Tom Lane
[EMAIL PROTECTED] writes:
 1)Do I run these old versions on my linux servers and the new version 8.1x
 for development?  If I do this will I have to constantly battle
 compatibility issues when going from development to the production
 servers?  Will it be a big headache?  Will I be missing out on major
 performance or features?

No, yes, yes, and yes.  You do not want to be running PG 7.anything
anymore if you can help it.  If your intention is to go into production
very soon, standardize on 8.1.x ... if your production release date is a
few months out, you'd be doing yourself a favor to adopt 8.2 now.
(8.2RC1 should be available by Monday.)

 2)Is there a reliable way to install 8.1x on debian and centos using apt
 and yum?

Look into Debian unstable, or if you are partial to Red Hat-derived
stuff look into Fedora.

 3)Should I just compile from source on the linux boxes?  Should I expect
 any problems with this even on the old 2.4 kernel?

I'd advise you to be using a 2.6 kernel at this point, too.  I don't
know what the Centos guys have in mind as a schedule for releasing
a 2.6-based distro, but again Fedora is at least as good a bet if you
want a Red Hat based distro without official Red Hat support.

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] which version? old user coming back....

2006-11-25 Thread Stephen Harris
On Sat, Nov 25, 2006 at 04:23:10PM -0500, Tom Lane wrote:
 I'd advise you to be using a 2.6 kernel at this point, too.  I don't
 know what the Centos guys have in mind as a schedule for releasing
 a 2.6-based distro, but again Fedora is at least as good a bet if you
 want a Red Hat based distro without official Red Hat support.

FWIW, CentOS is basically following RedHat Enterprise Linux, building
distros based on the sources RedHat releases for their Enterprise Linux.
Thus CentOS 4 is RHEL 4, which is 2.6 based.

My CentOS 4.4 (RHEL4update4) is running a Linux 2.6.9-42.0.3.EL kernel.
Of course RedHat version numbers (and thus CentOS) don't really compare
to the actual software.  All this means is they started with a 2.6.9
kernel and have heavily patched it (at least 42 releases of the package).

-- 

rgds
Stephen

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] which version? old user coming back....

2006-11-25 Thread developer
Thanks for the reply.

 [EMAIL PROTECTED] writes:
 1)Do I run these old versions on my linux servers and the new version
 8.1x
 for development?  If I do this will I have to constantly battle
 compatibility issues when going from development to the production
 servers?  Will it be a big headache?  Will I be missing out on major
 performance or features?

 No, yes, yes, and yes.  You do not want to be running PG 7.anything
 anymore if you can help it.  If your intention is to go into production
 very soon, standardize on 8.1.x ... if your production release date is a
 few months out, you'd be doing yourself a favor to adopt 8.2 now.
 (8.2RC1 should be available by Monday.)

Is 8.2 that much different from 8.1?  The change log seems to indicate an
easy upgrade using pg dump.  I really need stability, is 8.2 really there
yet?


 2)Is there a reliable way to install 8.1x on debian and centos using apt
 and yum?

 Look into Debian unstable, or if you are partial to Red Hat-derived
 stuff look into Fedora.

I have and if it is there I can't find it.

 3)Should I just compile from source on the linux boxes?  Should I expect
 any problems with this even on the old 2.4 kernel?

 I'd advise you to be using a 2.6 kernel at this point, too.  I don't
 know what the Centos guys have in mind as a schedule for releasing
 a 2.6-based distro, but again Fedora is at least as good a bet if you
 want a Red Hat based distro without official Red Hat support.

I agree with your sentiments on 2.6.  The Centos 4 is a 2.6 kernel,
however the debian server I am using is 2.4 just because it has been
around for a while and I probably can't change that for another year.  I
assume 8 will still work on 2.4 though.


   regards, tom lane

 ---(end of broadcast)---
 TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match




---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[GENERAL] Editing contrib modules which are loaded by default?

2006-11-25 Thread novnov

In all of postgres 8.1.4 (windows) databases I create there are a bunch of
cube and g_cube functions added to the db. If these are not needed, is there
a simple way to make sure that they are not added to new databases?
-- 
View this message in context: 
http://www.nabble.com/Editing-contrib-modules-which-are-loaded-by-default--tf2705139.html#a7542807
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] which version? old user coming back....

2006-11-25 Thread Peter Eisentraut
[EMAIL PROTECTED] wrote:
 2)Is there a reliable way to install 8.1x on debian and centos using
 apt and yum?

For Debian, take a look at backports.org.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-25 Thread Raymond O'Donnell
On 25 Nov 2006 at 14:24, novnov wrote:

 In all of postgres 8.1.4 (windows) databases I create there are a
 bunch of cube and g_cube functions added to the db. If these are not
 needed, is there a simple way to make sure that they are not added to
 new databases? 

As I was telling you on the pgadmin-support list, these are copied 
from the template1 database whenever you create a new database - the 
CREATE DATABASE command effectively duplicates template1.

To prevent these functions from appearing in your new databases, 
remove them from template1.

Have a look at the docs:
http://www.postgresql.org/docs/8.1/interactive/manage-ag-
createdb.html

--Ray O'Donnell

--

Raymond O'Donnell
Director of Music, Galway Cathedral, Galway, Ireland
[EMAIL PROTECTED]
--



---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-25 Thread novnov

Hi Ray - yes I read and checked in to your advice on the other list but I
posted here because the procedure looked a little complex and possibly risky
for a newbie like me. Rather than ask you for a simpler way to go, I figured
I'd post here and see what I came up with...and knew of course that you'd
probably be on this list too. I'm just hoping that there is a way to clear
those spurious (to me) entries without the level of hacking that the article
you pointed me to entailed.



Raymond O wrote:
 
 On 25 Nov 2006 at 14:24, novnov wrote:
 
 In all of postgres 8.1.4 (windows) databases I create there are a
 bunch of cube and g_cube functions added to the db. If these are not
 needed, is there a simple way to make sure that they are not added to
 new databases? 
 
 As I was telling you on the pgadmin-support list, these are copied 
 from the template1 database whenever you create a new database - the 
 CREATE DATABASE command effectively duplicates template1.
 
 To prevent these functions from appearing in your new databases, 
 remove them from template1.
 
 Have a look at the docs:
 http://www.postgresql.org/docs/8.1/interactive/manage-ag-
 createdb.html
 
 --Ray O'Donnell
 
 --
 
 Raymond O'Donnell
 Director of Music, Galway Cathedral, Galway, Ireland
 [EMAIL PROTECTED]
 --
 
 
 
 ---(end of broadcast)---
 TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
 
 

-- 
View this message in context: 
http://www.nabble.com/Editing-contrib-modules-which-are-loaded-by-default--tf2705139.html#a7542987
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/


Re: [GENERAL] Editing contrib modules which are loaded by default?

2006-11-25 Thread novnov

I hadn't checked and the page you pointed to here was different from the one
you pointed to on the other list
(http://www.postgresql.org/docs/techdocs.22). I've experimented a bit and
have been able to see what template0 consists of by creating a db based on
it. It lacks the ref to the lang plpgsql. So if I made a new template1 from
template0, all new dbs would lack that lang. That leaves me with a different
starting point for my new dbs but still not what I want.

Seems like this core config aspect of postgres could be a little simpler to
manage...anyways I'll figure it out, your pointers have helped.



novnov wrote:
 
 Hi Ray - yes I read and checked in to your advice on the other list but I
 posted here because the procedure looked a little complex and possibly
 risky for a newbie like me. Rather than ask you for a simpler way to go, I
 figured I'd post here and see what I came up with...and knew of course
 that you'd probably be on this list too. I'm just hoping that there is a
 way to clear those spurious (to me) entries without the level of hacking
 that the article you pointed me to entailed.
 
 
 
 Raymond O wrote:
 
 On 25 Nov 2006 at 14:24, novnov wrote:
 
 In all of postgres 8.1.4 (windows) databases I create there are a
 bunch of cube and g_cube functions added to the db. If these are not
 needed, is there a simple way to make sure that they are not added to
 new databases? 
 
 As I was telling you on the pgadmin-support list, these are copied 
 from the template1 database whenever you create a new database - the 
 CREATE DATABASE command effectively duplicates template1.
 
 To prevent these functions from appearing in your new databases, 
 remove them from template1.
 
 Have a look at the docs:
 http://www.postgresql.org/docs/8.1/interactive/manage-ag-
 createdb.html
 
 --Ray O'Donnell
 
 --
 
 Raymond O'Donnell
 Director of Music, Galway Cathedral, Galway, Ireland
 [EMAIL PROTECTED]
 --
 
 
 
 ---(end of broadcast)---
 TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Editing-contrib-modules-which-are-loaded-by-default--tf2705139.html#a7543210
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] How to restore a dumbed file in postgreSQL

2006-11-25 Thread Yesh

Thanks for ur help guys. 
-- 
View this message in context: 
http://www.nabble.com/How-to-restore-a-dumbed-file-in-postgreSQL-tf2695735.html#a7535475
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Dollaw sign quoting disabled

2006-11-25 Thread Miko O'Sullivan

No, I realized afterwards that I had mistakenly installed a 7.x
version of PG.  I had hoped that cancelling my post to Google groups
would eradicate it, but alas, posting to the net is like throwing
feathers to the wind.

Sorry for the distraction.

Miko

On 11/24/06, Bricklen Anderson [EMAIL PROTECTED] wrote:

snappingturtle wrote:
 It appears that in my installation of Postgres that dollaw sign quoting
 is disabled.  For example, the following command returns an error:

snip

 I didn't do anything (that I know of) to disable dollar quoting.  Any
 advice on how to enable dollar sign quoting?

Are you on postgresql version 8+?



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[GENERAL] Clone all user defined triggers in schema

2006-11-25 Thread Andrus
During schema duplication, I need to duplicate all user-defined triggers in
new schema in 8.1+

I created a query which returns trigger definitions which will be run 
against new
schema.

Is this the best way or is it possible to get CREATE TRIGGER statements
without schema names or with new schema names directly ?


SELECT
  REPLACE( pg_catalog.pg_get_triggerdef(pg_trigger.oid),
 ' ON mycurrentschema.', ' ON mynewschema.' ) as newtriggerdef
FROM pg_catalog.pg_trigger
join pg_catalog.pg_class on pg_trigger.tgrelid = pg_class.oid
JOIN pg_catalog.pg_namespace ON pg_namespace.oid=pg_class.relnamespace
WHERE not pg_trigger.tgisconstraint
and pg_namespace.nspname='myschema'


Andrus. 



---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] PGDATA

2006-11-25 Thread [EMAIL PROTECTED]


Well.. you are correct!
After studying the contents of /etc/init.d/postfresql, I put
PGDATA=/home3/mylargedisk/data in /etc/sysconfig/pgsql/postgresql
and it now works.

So what the . is this PGDATA!! It must be a trivial concept
cause nobody else is worried about how it works!!  And How do I get
each database to be in a different directory?!!

Thanks.


 Well not really,  I bet /etc/init.d/postgresql is getting its variables from
 /etc/conf.d/postgresql.  you will have to find it there and change it.

 Regards,

 Richard Broersma Jr.

 ---(end of broadcast)---
 TIP 4: Have you searched our list archives?
 
http://archives.postgresql.org/


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread John DeSoi
New Project: wxWidgets based cross-platform GUI for Open Source  
databases



You might also want to investigate XUL (http://en.wikipedia.org/wiki/ 
XUL). In addition to having low level C/C++, you can provide the  
ability to create interfaces with XML and JavaScript. Applications  
can run stand alone (XUL Runner) and perhaps interesting XUL browser  
plugins would be possible.






John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org/


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Ritesh Nadhani

Hello

On 11/25/06, Thomas Kellerer [EMAIL PROTECTED] wrote:

 - Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
 layer to connect and work with the databases and JAVA or some other kind
 of high level toolkit/language to develop the GUI. This results in
 applications being bulky and slow and never able to provide the speed
 that a low level C/C++ client API provide and are supported by all of
 the standard databases.

I am maintaining such an application and it is neither bulky nor slow. It's all
a matter of implementation.



Can I have a link to the application or more info on that? I would be
interested to take a look into it.


Just an example: with the enhanced batching in Oracle's current JDBC driver
(yes, I know this is an Oracle list) I can even achieve the same import speed as
SQL*Loader when importing flat files.



I have nothing against JDBC or JAVA (did my words sounded petulant
towards it?) but 90% of the databases do provide lowest level APIs in
C. Having an app in C helps us to use very very less memory (this I
say from my experience where I could get million record from a remote
server to my client at much faster rates then a another app).  Lot of
times it has happened that the C API (atleast with MySQL and PGSQL C
API)  provides some extra information which when smartly used can make
things lot efficient.

Also, why I started a thread with wxWidgets was because C/C++ is what
I have been using all my life and from my experience of developing
couple of cross platform simple GUI, I fount wxWidgets to most mature
and easy to use.

But somebody in one of his replies suggested XUL. I will read about it tomorrow.


Btw: coming from a Java world, I do consider HSQLDB and Derby belonging to the
list of standard databases



I am sure there would be ways to provide for support for them too but
I am not sure as of now.


Thomas



Ritesh



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Ritesh Nadhani

Hello

On 11/25/06, Richard Troy [EMAIL PROTECTED] wrote:


Hi Ritesh,

I'm in support of Tomi's comments (especially those about consulting), and
have a few more thoughts to add. To wit:

First, as an aside, as I didn't know anything about SQLyog, I read your
post first, then went to the URL cited. Throughout your post, it wasn't
clear what the subject was exactly as it seemed you were talking in some
places about a database management interface and in other places some kind
of development environment for people to create cross-platform GUIs in. As
you expand your search for volunteers, you might consider making this more
clear - I'm sure I'm not the only one who doesn't/didn't know what SQLyog
is...



Well, sorry if my words were confusing. I was thinking of an MS SQL
Query Analyzer, SQLyog, PGAdmin kind of tool to start with which will
provide a basic admin tool initially. And based upon that
layer/architecture we will provide more advanced tools like query
builder etc.

I think I jumped the boat far too quickly, I also meant a development
environment to be provided by this tool later on but come to think of
it, it is already provided by OpenOffice so we wont probably need to
think on that line.

So I guess, the tool that I have in mind is a database management
interface - something like Toad for Oracle (which probably everybody
knows).


On Sat, 25 Nov 2006, Ritesh Nadhani wrote:

  Hello all

 Let me introduce myself first. I am the ex-lead developer of SQLyog
 (one  of the most popular GUI for MySQL which is Windows only and runs
 on  Linux through WINE, more info at http://www.webyog.com).

 ===
 New Project: wxWidgets based cross-platform GUI for Open Source databases
 ===

 ===
 Motivation
 ===

 I have recently shifted to US to study for MS (and hopefully PhD in Univ
 of Iowa). I have also shifted to Mac OS X as my primary usage machine
 (after lifetime of Windows devotion).

 As part of my coursework, I work with MySQL and PostgreSQL
 extensively. I searched but couldnt find any GUI which has similar
 power like SQLyog by any means. I have tried (and have tried before
 also) various GUIs for respective databases but somehow the features
 in them are restrictive and are not powerful enough for developers
 like me who writes lots of SQL queries and needs to get things done
 fast.

 We can say that we already have enough GUIs for all open source
 databases (open source as well as commercial) available in the market
 but are they powerful enough to suffice the needs of an experienced
 SQL developer as well as newbies. The top three problems with existing
 GUI managers are:

 - Most of the usable/powerful GUIs are not open source which is one of
 the most powerful motivation for us to look for an alternate solutions.

 - 90% of such GUIs are DB specific. It becomes very hard for developers
 who work with multiple DBs as part of their work. It forces them to
 learn different user interface/softwares to work with the respective
 databases.

A few thoughts here; each db engine has its own;

- sql dialect, dispite the best efforts of SQL92 et al.

- sql query plan output mechanism and format

- naming restrictions (some know from context what table/attribute names
are while others absolutely demand reserved-words remain reserved, even
when they'll never be found in a particular context) - presuming you want
to provide, works here but not there advice.

- system catalogs

- index structures

- transaction log semantics

- lock management - presuming you wish to include a which transaction has
the lock functionality

- activity/error/security log systems - presuming you wish to provide
error resolution assistance

- maintenance tools suite, like Postgres' vacuum

- backup and recovery suite



Yes I know that. So we can make our architecture to be modular where
each db interface use its own most efficient way rather then a generic
way which would make things slow. And if a feature is not provided by
a DB, that option would be just turned off for that DB.

My motivation for the idea comes from the plauggable engine support
that MySQL provides.



 - Of the few multiple-db GUIs, 99% (or probably 100%) use JDBC/ODBC
 layer to connect and work with the databases and JAVA or some other kind
 of high level toolkit/language to develop the GUI. This results in
 applications being bulky and slow and never able to provide the speed
 that a low level C/C++ client API provide and are supported by all of
 the standard databases.

The reason - a reason - JDBC (and I presume ODBC) is so popular for these
purposes is that it helps resolve a handful - a large handful - of the
challenges of writing cross-database-platform.



As I replied in my previous two mails, my motivation for using
wxWidgets/C/C++ remains same.



 A simple to use GUI for all databases
 ===

 The basic idea behind such a GUI is to develop a small footprint,
 extremely fast, multilingual, cross platform administrator/development
 tool for databases. 

Re: [GENERAL] Development of cross-platform GUI for Open Source DBs

2006-11-25 Thread Ritesh Nadhani

Thanks for the info. I will take a look at it soon.

On 11/25/06, John DeSoi [EMAIL PROTECTED] wrote:

 New Project: wxWidgets based cross-platform GUI for Open Source
 databases


You might also want to investigate XUL (http://en.wikipedia.org/wiki/
XUL). In addition to having low level C/C++, you can provide the
ability to create interfaces with XML and JavaScript. Applications
can run stand alone (XUL Runner) and perhaps interesting XUL browser
plugins would be possible.





John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL




---(end of broadcast)---
TIP 6: explain analyze is your friend