[GENERAL] Under Red Hat AS in a WIndows Virtual Machine

2007-02-08 Thread Matt Miller
I'm looking at running PG under Red Hat AS, but within a virtual machine. The host will be a Windows 2003 Enterprise server running Windows Virtual Machine 2005 Enterprise. From the archives it seems that people are doing this type of thing successfully, but I just wanted to see if anyone had

Re: [GENERAL] Command connect by prior in PostgreSQL ?

2007-01-08 Thread Matt Miller
In Oracle i use the command connect by prior and i need to use it in PostgreSQL, what is the sintax? I was unable to find pg-hier in a quick cruise through PgFoundry. Try http://gppl.moonbone.ru/ The patch is not yet fixed to 8.2.0. 8.1.2 looks to be the latest.

[GENERAL] pgcluster-1.7.0rc1-patch

2006-12-18 Thread Matt Miller
I asked this on a pgcluster forum at pgfoudry a few days ago, but no one responded: When I apply pgcluster-1.7.0rc1-patch to Postgres REL8_2_STABLE I get a handful of rejects. Is this to be expected, or should I be applying against some different source? ---(end of

Re: [GENERAL] pgcluster-1.7.0rc1-patch

2006-12-18 Thread Matt Miller
I asked this on a pgcluster forum at pgfoundry a few days ago, but no one responded I suspect that pgcluster has become obsoleted and no longer maintained. Well, a patch for 8.2 was released on pgfoundry 7-Dec-2006. I suggest looking at pgpool-II and/or slony1 ... Also, the High

[GENERAL] Convert Oracle DECODE to CASE Automatically

2006-11-29 Thread Matt Miller
I thought I saw a thread (here or on -hackers, or somewhere) where someone created a C program or something to automatically convert Oracle's DECODE expression into an ANSI CASE expression. Now I'm not finding that thread. Is there such a beast? ---(end of

[GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Matt Miller
I'd like SYSDATE to work syntactically and semantically the same as CURRENT_TIMESTAMP (or CURRENT_TIME, or whatever). I can create a function called sysdate that does the trick, but then it seems I have to reference the function as sysdate (), but I want to be able to get away with just sysdate.

[GENERAL] Automatically Creating INSERT/UPDATE/DELETE Rules on Views

2006-11-10 Thread Matt Miller
I'm converting a large Oracle DB that uses hundreds of updatable views. ora2pg is quite useful, but it looks like it doesn't do anything to create the rules that are needed to make the views updatable. Under Oracle simple views like select * from the_table are automatically updatable, so the

[GENERAL] cvs HEAD initdb: vacuuming database template1 ... FATAL: could not identify a comparison function for type aclitem

2006-11-06 Thread Matt Miller
cvs HEAD does this to me when I try to initdb: [EMAIL PROTECTED]:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user postgres. This user must also own the server process. The database cluster will be initialized with locale

Re: [GENERAL] Route Miles

2005-09-09 Thread Matt Miller
On Fri, 2005-09-09 at 10:13 -0400, Terry Lee Tucker wrote: we would have to use the [non-free] products above because the customers demand calculations based on a commercial product. Are you saying that customers demand that you use a non-free product, or are you saying that customers demand a

Re: [GENERAL] select ..... for update of ... doesn't support

2005-09-06 Thread Matt Miller
On Tue, 2005-09-06 at 13:45 -0400, Vlad wrote: SELECT * FROM one.aa, two.bb WHERE one.aa.a = two.bb.b FOR UPDATE OF one.aa; ERROR: syntax error at or near . at character 73 (points to the last instance of one.aa in SQL query Try using a table alias, and reference that alias in the for

Re: [GENERAL] Self creating tables

2005-09-02 Thread Matt Miller
On Fri, 2005-09-02 at 09:51 -0700, Bob Pawley wrote: regarding the setting up of tables ... I could create a separate table for each category of elements ... The challenge is ... a distinct possibility of the user inserting an element that we haven’t considered. The above approach would

Re: [GENERAL] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Matt Miller
[redirected from -patches] On Wed, 2005-08-03 at 16:25 -0400, Tom Lane wrote: Matt Miller [EMAIL PROTECTED] writes: allow a PL/pgSQL exception to not automatically rollback the work done by the current block. This fundamentally breaks the entire backend. You do not have the option

Re: [GENERAL] Postgresql replication

2005-08-26 Thread Matt Miller
On Thu, 2005-08-25 at 17:45 -0700, Jeff Davis wrote: The replicator surely is not optional, and must be centralized. From http://pgcluster.projects.postgresql.org/1_3/index.html: Several replication server can be set up. When an problem occurs at the replication server, Cluster DB automatically

Re: [GENERAL] Postgresql replication

2005-08-25 Thread Matt Miller
http://pgfoundry.org/projects/pgcluster/ which provides syncronous multi-master clustering. He specifically said that pgcluster did not work for him because ...PGCluster requires that there be a load balancer and a replicator centrally located managing the cluster. If a network problem

Re: [GENERAL] Question about Foreign key constraint causes costly

2005-08-23 Thread Matt Miller
On Tue, 2005-08-23 at 10:30 -0400, Emi Lu wrote: I'd like to setup foreign key constraint for A.col3, as the following: CONSTRAINT Aclo3_fk FOREIGN KEY (col3) REFERENCES B(colB1) But I got a warning msg from postgresql as: foreign key constraint Aclo3_fk will require costly sequential

Re: [GENERAL] Schema design question

2005-08-17 Thread Matt Miller
On Wed, 2005-08-17 at 10:49 -0700, Bill Moseley wrote: The parent object is a general course description, and the child object is a specific instance of a course ... tables that represent classes taught at a school. The parent object is a general course ... the child object is ... a class

Re: [GENERAL] Schema design question

2005-08-17 Thread Matt Miller
On Wed, 2005-08-17 at 13:40 -0700, Bill Moseley wrote: a course and class share so many columns. ...and I worry about changing a column type on one table and forgetting to change it on the other table. Postgres types might help here. You could probably create a type that contains the common

Re: [GENERAL] Prevent inserting document without rows

2005-08-16 Thread Matt Miller
On Tue, 2005-08-16 at 17:31 +0300, Andrus wrote: Each invoice must have at leat one row. I want that transaction commit fails if invoice header is inserted without any row in invoice rows table. How to prevent inserting invoice headers without rows ? You could have a NOT NULL foreign

Re: [GENERAL] Waiting on a transaction

2005-08-16 Thread Matt Miller
On Tue, 2005-08-16 at 12:01 -0700, Bill Moseley wrote: I wondered if my application should set an alarm and timeout with an error if, by odd chance, an update hangs. Here's a way to handle this under the upcoming 8.1 release: Before you execute the update you can execute SELECT ... FOR UPDATE

Re: [GENERAL] question : postgres + Powerbuilder

2005-08-10 Thread Matt Miller
On Wed, 2005-08-10 at 11:36 -0400, Hugo wrote: anybody developing apps with powerbuilder and postgres Take a look at http://pbpgsql.spiderbark.com/index.php ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Testing of MVCC

2005-08-08 Thread Matt Miller
I want to write some regression tests that confirm the behavior of multiple connections simultaneously going at the same tables/rows. Is there something like this already, e.g. in src/test/regress? In particular I want confirm the robustness of some PL/pgSQL functions in a multi-user

[GENERAL] CVS - psql segfault

2005-07-15 Thread Matt Miller
The CVS version of psql was segfaulting on exit yesterday, and today's version segfaults when the program starts. Is this happening to anyone else? I'm on Red Hat ES4. My understanding is that the latest code is rarely broken. Is is not unusual for a problem like this to persist for a couple

Re: [GENERAL] CVS - psql segfault

2005-07-15 Thread Matt Miller
On Fri, 2005-07-15 at 12:27 -0400, Alvaro Herrera wrote: On Fri, Jul 15, 2005 at 03:47:20PM +, Matt Miller wrote: The CVS version of psql was segfaulting Did you try make distclean before rebuilding? I had not done make distclean. After doing this all is well

Re: [GENERAL] CVS - psql segfault

2005-07-15 Thread Matt Miller
On Fri, 2005-07-15 at 13:22 -0400, Tom Lane wrote: Matt Miller [EMAIL PROTECTED] writes: The CVS version of psql was segfaulting What are your locale settings? [EMAIL PROTECTED] ~]$ locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF

Re: [GENERAL] Standalone Parser for PL/pgSQL

2005-07-14 Thread Matt Miller
On Thu, 2005-07-14 at 14:32 +1000, Neil Conway wrote: Alvaro Herrera wrote: I don't think you can use just plpgsql's parser. ... it relies on the main backend parser If you're content to treat expressions and SQL queries as opaque strings, you shouldn't need to concern yourself with the

[GENERAL] Standalone Parser for PL/pgSQL

2005-07-13 Thread Matt Miller
I'd like (to find or make) a utility that inputs the code of a Pl/pgSQL function (e.g. from a text file or from STDIN, and then parses the function definition, building a complete symbol table. I would then write C code that walks that symbol table and does stuff. As a starting point I'd be

Re: [GENERAL] Standalone Parser for PL/pgSQL

2005-07-13 Thread Matt Miller
On Wed, 2005-07-13 at 17:04 -0400, Alvaro Herrera wrote: a simple standalone PL/pgSQL parser it relies on the main backend parser ... you'd have to mix both parsers somehow. ... The main parser depends (at least) on the List handling and memory handling Okay, you scared me off. It looks

[GENERAL] PL/SQL to PLpg/SQL - NO_DATA_FOUND

2005-07-12 Thread Matt Miller
I need to convert hundreds of Oracle stored procs across several developing databases. I'm focusing on scripting as much of this as possible, and I'm currently stuck on converting PL/SQL's NO_DATA_FOUND behavior. What approaches have other people used? I'm targeting PostgreSQL 8.1. The problem

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Matt Miller
On Tue, 2005-07-12 at 18:29 +0200, Bjørn T Johansen wrote: Is it as stable as the Linux version From http://www.postgresql.org/docs/whatsnew: Although tested throughout our release cycle, the Windows port does not have the benefit of years of use in production environments that PostgreSQL has

Re: [GENERAL] Sizes

2005-07-01 Thread Matt Miller
On Fri, 2005-07-01 at 07:50 -0700, Bob Pawley wrote: what are the number of schemas, tables and views that would constitute a databse considered to be small, medium or large? Totally subjective opinion: Small database: few dozen tables/views Medium database: 100 tables/views Large database:

[GENERAL] CVS Build - No Doc

2005-06-29 Thread Matt Miller
Yesterday I checked out a cvs copy and I: ./configure make make install as usual. The database works, but the installation has no doc directory. I prefer to read the doc locally. How do I build the doc? The source tree has a doc directory containing what looks to be the sgml source, but I

Re: [GENERAL] CVS Build - No Doc

2005-06-29 Thread Matt Miller
How do I build the doc? http://developer.postgresql.org/docs/postgres/docguide-build.html That worked. I couldn't find the Red Hat ES4 package that contains the 'collateindex.pl' script that the build process needs, so I had to go hunting. I got that Perl script at

Re: [GENERAL] CVS Build - No Doc

2005-06-29 Thread Matt Miller
On Wed, 2005-06-29 at 21:31 +0300, Devrim GUNDUZ wrote: I couldn't find the Red Hat ES4 package that contains the 'collateindex.pl' script that the build process needs docbook-style-dsssl-1.78-4 I had installed that package. It looks like problem was I didn't './configure' from the top of

Re: [GENERAL] null constraints and defaults

2005-06-29 Thread Matt Miller
On Wed, 2005-06-29 at 13:04 -0700, elein wrote: default constraint ... elein=# insert into nulldefault values (NULL); ERROR: null value in column one violates not-null constraint I think the idea of a DEFAULT value is to tell the DB what to supply only if you omit the column from the insert

[GENERAL] Building Latest (8.1)

2005-06-28 Thread Matt Miller
I'm trying to test a feature I see in the 8.1devel documentation. I figured I'd checkout a cvs working copy. Following the doc I: cvs -d :pserver:[EMAIL PROTECTED]:/projects/cvsroot login but that just hangs and eventually times out. I looked at CVSup, but I found no binaries for CVSup at

Re: [GENERAL] Building Latest (8.1)

2005-06-28 Thread Matt Miller
On Tue, 2005-06-28 at 17:57 +, Matt Miller wrote: Following the doc I: cvs -d :pserver:[EMAIL PROTECTED]:/projects/cvsroot login but that just hangs and eventually times out. ... What am I doing wrong? I had a problem on my end. CVS checkout is now working

Re: [GENERAL] Building Latest (8.1)

2005-06-28 Thread Matt Miller
On Tue, 2005-06-28 at 18:35 -0400, Tom Lane wrote: Matt Miller [EMAIL PROTECTED] writes: I'm trying to test a feature I see in the 8.1devel documentation. I figured I'd checkout a cvs working copy. Following the doc I: cvs -d :pserver:[EMAIL PROTECTED]:/projects/cvsroot login

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Matt Miller
On Wed, 2005-06-15 at 12:50 -0400, Tom Lane wrote: I might look at adding that frammish into it Frammish? ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] returning in postgresql request

2005-06-09 Thread Matt Miller
deploy an Application with Oracle Database to a solution with postgresql. ... UPDATE xdb_ancestors_lock SET nb_lock=nb_lock+1 WHERE doc_id=? AND ele_id=? returning nb_lock INTO nb; Looks like you really want: UPDATE xdb_ancestors_lock SET nb_lock=nextval('nb_lock_sequence') WHERE

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
It's curious to me that the following is fine: beginning of output= test=# select '1001'::bit varying; varbit 1001 (1 row) end of output Okay, I guess I'm not so curious, thanks to

[GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
I'm trying to interpret strings of Y's and N's as bit vectors and perform bitwise ops on them. It's not working: beginning of output= test=# select version (); version

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
On Thu, 2005-06-09 at 20:05 +, Matt Miller wrote: I'm trying to interpret strings of Y's and N's as bit vectors and perform bitwise ops on them. Well, I ended up writing a bunch of code to accomplish what I initially thought would be just some casting and bitops on built-in types. I really

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
I ended up writing a bunch of code to accomplish what I initially thought would be just some casting and bitops on built-in types. I imagine you could have done something involving textout() and varbit_in(), like alvherre=# select varbit_in(textout(translate('YYNY', 'YN', '10')),

Re: [GENERAL] IMPORTANT NOTIFICATION

2005-06-08 Thread Matt Miller
you will have to confirm your account by the following link Is this bogus? Clicking on the link goes to 62.193.220.183 which is not postgresql.org ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [GENERAL] Autonomous Transactions

2005-06-03 Thread Matt Miller
a way to enable a function to commit a unit of work that does not affect the caller's transaction. you can establish an independent connection within a function in, say, PL/Perl or PL/Python. Okay, multiple connections seems to be my best shot. However, I would like standard developers to

Re: [GENERAL] Autonomous Transactions

2005-06-03 Thread Matt Miller
a way to enable a function to commit a unit of work that does not affect the caller's transaction. Is dblink a possible answer? (it's a contrib package.) Very interesting. When you earlier mentioned dblink I found only DBLink-TDS on pgFoundry, and I dismissed it since I'm not accessing

Re: [GENERAL] Autonomous Transactions

2005-06-03 Thread Matt Miller
a way to enable a function to commit a unit of work that does not affect the caller's transaction. accomplish autonomous transactions in PL/pgSQL by just using dblink_connect, dblink_open, dblink_exec, and dblink_close? My initial tests lead me to believe that dblink is a simple and

[GENERAL] Autonomous Transactions

2005-06-01 Thread Matt Miller
I'm looking for a way to enable a function to commit a unit of work that does not affect the caller's transaction. I'm coming from the Oracle world where I've used the autonomous_transaction pragma of PL/SQL to do this. I'm new to Postgres, but I'm hopeful that I can move our systems from

[GENERAL] Strongly-Typed Refcursor (PowerBuilder Datawindow Clients)

2005-05-26 Thread Matt Miller
I'd like a function to return a strongly-typed refcursor. My goal is to allow callers of the function to know, based on the function's return type, the number and data types of the columns that it can expect in the refcursor. From what I see in plpgsql, all refcursors are allowed to point to any

Re: [GENERAL] Just a crazy idea!

2005-05-26 Thread Matt Miller
On Thu, 2005-05-26 at 17:21 -0400, Hrishikesh Deshmukh wrote: I have a little schema in pgsql and some annotation in mysql; ... if i could make these two talk ... So the question and frankly i thought it was crazy thought! The replys so far indicate that i am not looney at all ;) Well the