Re: [GENERAL] Object Relational, Foreign Keys and Triggers

2005-01-25 Thread Martijn van Oosterhout
On Mon, Jan 24, 2005 at 07:22:32PM -0500, Alex Turner wrote: > I am facing the classic pgsql ORDBMS problem: Why are you using MAX()? That won't work at all. Perhaps you need to look up the documentation for nextval and currval. In particular, that second query should be: insert into entity_pho

Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird

2005-01-25 Thread Nicolai Tufar
On Sun, 23 Jan 2005 12:09:26 -0600, Jeffrey Melloy <[EMAIL PROTECTED]> wrote: > Although Oracle doesn't have a search path, it is possible to make > functions publicly available by doing "grant blah to public". After > that they can be used without a schema identifier. There is also CREATE PUBLIC

[GENERAL] Extended unit

2005-01-25 Thread Pailloncy Jean-Gerard
Hi, My question is purely theoretical. I add use in my time in University some software that use "extended type". For each variable, we define the mandatory "classic type" as integer, float, double array of. And we define an optional "extended type" as the unit in the MKSA system (Meter, Kilogra

Re: [GENERAL] Extended unit

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 10:40:15AM +0100, Pailloncy Jean-Gerard wrote: > Hi, > > My question is purely theoretical. > > I add use in my time in University some software that use "extended > type". > For each variable, we define the mandatory "classic type" as integer, > float, double array of.

Re: [GENERAL] disable trigger from transaction

2005-01-25 Thread Terry Lee Tucker
I'm glad your curiosity got the best of you ;o) I was planning to test it out, but didn't have the time to do it. I too, was very curious as to what the ramifications of dropping the trigger would be in that scenario. Now, we know :o) On Monday 24 January 2005 11:07 pm, Jeff Davis saith: > It g

[GENERAL] Backup DLL

2005-01-25 Thread Tope Akinniyi
Hi,   Is anyone aware of a standalone DLL that can be integrated with applications for pg_dump and restore without resorting to asking clients to use tools like pgAdmin for their backup and restore cores?   Thanks ALL-NEW Yahoo! Messenger - all new features - even more fun!

[GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Tope Akinniyi
Hi,   If I may ask, is there any plan for embedded PostgreSQL database as we have it in Firebird database?  In Firebird embedded a compact engine of the database that can only accept connections from localhost (127.0.0.1) and easily distributable with single user applications exists.   Any plan for

Re: [GENERAL] Backup DLL

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 7:25 AM, Tope Akinniyi wrote: Is anyone aware of a standalone DLL that can be integrated with applications for pg_dump and restore without resorting to asking clients to use tools like pgAdmin for their backup and restore cores? If your programming tool supports it, you can j

Re: [GENERAL] Backup DLL

2005-01-25 Thread Magnus Hagander
AFAIK, there is no such thing. But you can use pg_dump in a pipe - that's all pgAdmin does.   //Magnus From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tope AkinniyiSent: Tuesday, January 25, 2005 1:25 PMTo: pgsql-general@postgresql.orgSubject: [GENERAL] Backup

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Peter Eisentraut
Tope Akinniyi wrote: > If I may ask, is there any plan for embedded PostgreSQL database No. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if

Re: [GENERAL] Object Relational, Foreign Keys and Triggers

2005-01-25 Thread Alex Turner
Actualy max() works just fine. It's not the solution I use in the middle tier, but it works for a functional example. both max() and currval() are bad because they can cause a race condition where the sequence has been incremented by another thread. It's always better to get nextval('sequence')

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Vincenzo Ciancia wrote: > Should I find every > possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate place where I can ask my question? Thanks Vinc

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Richard_D_Levine
Do you need something from PostgreSQL that Firebird doesn't have? My experience has been that Firebird/Interbase is a fairly complete, ACID compliant, low/no maintenance back end for single workstation applications. On the other hand, you can make any RDBMS into an embedded database with enough b

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Christopher Browne
Martha Stewart called it a Good Thing when [EMAIL PROTECTED] (Tope Akinniyi) wrote: > If I may ask, is there any plan for embedded PostgreSQL database as > we have it in Firebird database?  In Firebird embedded a compact > engine of the database that can only accept connections from > localhost (1

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Sean Davis
On Jan 25, 2005, at 8:48 AM, Vincenzo Ciancia wrote: Vincenzo Ciancia wrote: Should I find every possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate

Re: [GENERAL] Object Relational, Foreign Keys and Triggers

2005-01-25 Thread Stephan Szabo
On Mon, 24 Jan 2005, Alex Turner wrote: > Insert fails with a foreign key constraint error because entity_phone > points to entity, not person, and the rows aren't physicaly in entity, > they are in person. > > Two questions: > 1) Why can't we make this work the 'right' way - not doing so either >

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Richard_D_Levine
The trick is making database administration invisible to the user. Since Firebird requires no administration, it's easy. The single file database architecture in Firebird is also easy since you generally have only one drive. The only administration item presented to the user should be a dialog t

Re: [GENERAL] Object Relational, Foreign Keys and Triggers

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 08:36:53AM -0500, Alex Turner wrote: > Actualy max() works just fine. It's not the solution I use in the > middle tier, but it works for a functional example. both max() and > currval() are bad because they can cause a race condition where the > sequence has been increment

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 8:44 AM, Christopher Browne wrote: You can do that with PostgreSQL by configuring pg_hba.conf to only accept connections from localhost. And there is no problem with the notion of creating a database in a local directory. None of this requires any change. But on Windows 8.0 you

Re: [GENERAL] Extended unit

2005-01-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-01-25 10:40:15 +0100: > I add use in my time in University some software that use "extended > type". > For each variable, we define the mandatory "classic type" as integer, > float, double array of. > And we define an optional "extended type" as the unit in the MKSA >

[GENERAL] software development solution

2005-01-25 Thread Jean-Yves Barbier
(Sorry I'm not subscribed, too much mails per day) Hi list, I have to develop a solution for one of my friend who has several shops that he wants to centralize the gestion and remote monitor: * DB will be PostgreSQL (with as many as possible stored procs) * Access *has* to be through a br

Re: [GENERAL] What is the format of 'binary' data in the postgresql client/server protocol version 3

2005-01-25 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 O, I C -- and agree! Unfortunately, though, I don't see many people jumping at the chance to translate all of this open source code into a more readable language (such as Pascal or Ada). And I haven't found (or written) that English compiler I've bee

Re: [GENERAL] Multiline plpython procedure

2005-01-25 Thread Marco Colombo
On Fri, 21 Jan 2005, Martijn van Oosterhout wrote: On Fri, Jan 21, 2005 at 12:02:09PM +0100, Marco Colombo wrote: On Fri, 21 Jan 2005, Greg Stark wrote: I don't think it's reasonable for pg_dump to think about converting data from one language to another. It's important for pg_dump to restore an id

Re: [GENERAL] How are foreign key constraints built?

2005-01-25 Thread Wes
On 1/23/05 1:01 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote: > If you like you can try the operation with "set > enable_seqscan = off", but I bet it will take longer. Ouch! That was a big mistake. Since inquiring minds want to know, I decided to give that a try. The expected outcome is to beat th

[GENERAL] Cube

2005-01-25 Thread fabrizio . boco
Hi, I have just installed V 8.0 on XP and I have discovered some interesting functions related to cubes and crosstabs. Navigating on the site I was not able to find any information/documentation. Please help. Thank you Regards Fabrizio ---(end of broadcast)--

Re: [GENERAL] pg_restore

2005-01-25 Thread Niederland
That worked thanks. Just can not use the "> DBFile" on windows. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] [PERFORM] DWH on Postgresql

2005-01-25 Thread Chris Travers
Cross-posting to GENERAL for additional comment. Matt Casters wrote: Hi, I have the go ahead of a customer to do some testing on Postgresql in a couple of weeks as a replacement for Oracle. The reason for the test is that the number of users of the warehouse is going to increase and this will h

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Sean Davis wrote: > Yes, this is a fine place to ask your question.ÂÂSometimesÂitÂdoesÂtake > a day or two to get an answer.ÂÂWillÂquote_literalÂdoÂwhatÂyouÂwant? > > http://www.postgresql.org/docs/8.0/interactive/functions-string.html > > Search on that page for quote_literal. > Thank you for

Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?

2005-01-25 Thread Ulrich Schwab
Chris Green wrote: > I'm working on an application for my own use and have been using knoda > as a front end to postgresql but I need a bit more power and flexibility. > > I'm quite happy to get into relatively serious programming as I am a > C++/Java programmer, this accounting package is rathe

[GENERAL] dbf2pg error

2005-01-25 Thread Andy Bernat
Greetings, I've run into a problem with the contributed program dbf2pg. It runs without error, creating a table with the correct columns but only the varchar columns have values: All of the floats are blank. Here is how I've run it: dbf2pg -t zip2 -c -d CBPdata DETL.DBF I'm running postgresq

Re: [GENERAL] Extended unit

2005-01-25 Thread Pailloncy Jean-Gerard
Is CREATE TYPE what you're looking for? http://www.postgresql.org/docs/8.0/static/sql-createtype.html No. I'll try to give an exemple of what I want: I suppose I have the following table CREATE TABLE experiment ( distanceDOUBLE, timeDOUBLE, speed DOUBLE )

[GENERAL] Restaurando una base de datos

2005-01-25 Thread alejandro fernandez
Hola a todos   Hace un rato baje la version 8.0 de para win, la instale y la verdad no se por donde hacer para poder restaurar el back up de mi bd; he ingresado a la opcion psql on template 1 y alli escribo psql dbname < c:\infile.bk y no ejecuta el restore.   Alguien sabe como debo hacerlo graci

[GENERAL] Recursive queries

2005-01-25 Thread tmp
Are there any plans on implementing support for recursive queries in postgresql in the near future? If so: When? I can see there has been some discussion on the subject in the developer-group for quite some time ago, but aparently all thoughts of recursive queries has been stalled. :-( Regards -

[GENERAL] postgresql.conf - add_missing_from

2005-01-25 Thread Niederland
postgres does not seem to pick up the following parameter in the postgresql.conf add_missing_from = false Setting the parameter via psql, functions properly SET add_missing_from TO FALSE Using: winxp, Postges 8.0 (note: I did restart the service after updating the parameters in postgresql.conf)

[GENERAL] My problem upgrading to 8.0.0

2005-01-25 Thread Dave Bodenstab
I upgraded from 7.1.3 to 8.0.0 and I find that almost every one of my scripts which parse psql output are broken. This is because of the array output format change that, I believe, happened around 7.2. I been using awk (and even /bin/sh) to parse psql's output and for 7.1.3 I was able to use three

Re: [GENERAL] Cube

2005-01-25 Thread Michael Glaesemann
On Jan 24, 2005, at 18:49, [EMAIL PROTECTED] wrote: I have just installed V 8.0 on XP and I have discovered some interesting functions related to cubes and crosstabs. Navigating on the site I was not able to find any information/documentation. Most of the documentation for contrib modules (such

Re: [GENERAL] Backup DLL

2005-01-25 Thread terry
It sounds like you are trying to automate administrative tasks.  If that's what you are trying to do, you may be well advised to use any one of the Unix/Linux/BSD operating systems: They all have far superior and simpler task automation tools such as cron and fully functional shells, somethi

[GENERAL] PostgreSQL 8.0 for RH AS

2005-01-25 Thread Fabio Esposito
Hello I wanted to ask if anyone knows if 8.0 is available as a RH AS package? Or perhaps if the rhel-es.3.0 would work on a RH AS system? I'm not much of a RH guru as I was raised on Debian. Thanks in advance for any help you can give. F. E. ---(end of broadcast)-

Re: [GENERAL] PostgreSQL 8.0 for RH AS

2005-01-25 Thread Lonni J Friedman
I'd doubt that the RHES3 RPMs work on RHAS-2.1. The RH9 RPMs might work ok on RHAS-2.1, but i've not tested them. On Tue, 25 Jan 2005 10:57:13 -0500 (EST), Fabio Esposito <[EMAIL PROTECTED]> wrote: > > Hello > > I wanted to ask if anyone knows if 8.0 is available as a RH AS package? > Or perha

Re: [GENERAL] Extended unit

2005-01-25 Thread Alban Hertroys
Martijn van Oosterhout wrote: On Tue, Jan 25, 2005 at 10:40:15AM +0100, Pailloncy Jean-Gerard wrote: This "extended type" was wonderful, because there was warning/error if "extend type" does not match in any computation: you can not add apple to orange. I think it's a wonderful idea. You could u

[GENERAL] difficult JOIN

2005-01-25 Thread Thomas Chille
Hi, i have the following SQL-Problem: We are using 2 tables. The first, called plan, is holding planned working times for employees per tour: plan.id_tour plan.id_employee plan.begin_time plan.end_time The second table 'work' stores the actual worked times for employees per tour: work.id_tour work

Re: [GENERAL] Cube

2005-01-25 Thread Oleg Bartunov
On Mon, 24 Jan 2005 [EMAIL PROTECTED] wrote: Hi, I have just installed V 8.0 on XP and I have discovered some interesting functions related to cubes and crosstabs. Navigating on the site I was not able to find any information/documentation. Please help. Why not use search engine ? For example, http

Re: [GENERAL] PostgreSQL 8.0 for RH AS

2005-01-25 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Tue, 25 Jan 2005, Fabio Esposito wrote: I wanted to ask if anyone knows if 8.0 is available as a RH AS package? Or perhaps if the rhel-es.3.0 would work on a RH AS system? I'm not much of a RH guru as I was raised on Debian. If it's RHAS 3.0 (not

[GENERAL] difficult JOIN

2005-01-25 Thread Thomas Chille (spoon)
Hi, i have the following SQL-Problem: We are using 2 tables. The first, called plan, is holding planned working times for employees per tour: plan.id_tour plan.id_employee plan.begin_time plan.end_time The second table 'work' stores the actual worked times for employees per tour: work.id_tour wor

Re: [GENERAL] Object Relational, Foreign Keys and Triggers

2005-01-25 Thread Tino Wildenhain
Am Dienstag, den 25.01.2005, 08:36 -0500 schrieb Alex Turner: > Actualy max() works just fine. It's not the solution I use in the > middle tier, but it works for a functional example. both max() and > currval() are bad because they can cause a race condition where the > sequence has been incremen

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Michael Fuhr
On Tue, Jan 25, 2005 at 04:28:06PM +0100, Vincenzo Ciancia wrote: > Thank you for your answer. Unfortunately quote_literal is not what I am > looking for, in fact it quotes special characters in the sense of strings, > not in the sense of regular expressions. It sounds like you're looking for the

[GENERAL] Postgresql, SQL server and Oracle. Please, help

2005-01-25 Thread Nadia Kunkov
Hi, I was wondering where can I get documentation and especially examples on PgSQL? I've done a lot of work with Ms SQL server and need to rewrite a number of stored procedures in PgSQL. Is there a tutorial? What is the best way to start? Can I read an Oracle book? How close is Oracle to Pos

Re: [GENERAL] Extended unit

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 05:17:21PM +0100, Alban Hertroys wrote: > Martijn van Oosterhout wrote: > >I think it's a wonderful idea. You could use a similar mechanism to > >implement: > > > >- Currencies (so you can't add dollars to pounds) > >- Timezone aware timestamps (so a time in Australia looks

Re: [GENERAL] Recursive queries

2005-01-25 Thread Martijn van Oosterhout
On Mon, Jan 24, 2005 at 05:27:46PM +0100, tmp wrote: > Are there any plans on implementing support for recursive queries in > postgresql in the near future? If so: When? > > I can see there has been some discussion on the subject in the > developer-group for quite some time ago, but aparently all

Re: [GENERAL] Search for restricting foreign keys

2005-01-25 Thread Florian G. Pflug
Michael Fuhr wrote: On Mon, Jan 24, 2005 at 08:35:45PM -0800, Benjamin Smith wrote: Is there a way in PG 7.3, given a field, to find out what other tables & records are linked to it via a foreign key? The pg_constraint table contains, among other things, foreign key constraints. By querying it an

Re: [GENERAL] Postgresql, SQL server and Oracle. Please, help

2005-01-25 Thread felix
On Tue, Jan 25, 2005 at 12:35:50PM -0500, Nadia Kunkov wrote: > Hi, I was wondering where can I get documentation and especially examples on > PgSQL? I've done a lot of work with Ms SQL server and need to rewrite a > number of stored procedures in PgSQL. Is there a tutorial? What is the best

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Christopher Browne
[EMAIL PROTECTED] (John DeSoi) writes: > On Jan 25, 2005, at 8:44 AM, Christopher Browne wrote: >> You can do that with PostgreSQL by configuring pg_hba.conf to only >> accept connections from localhost. >> >> And there is no problem with the notion of creating a database in a >> local directory. >

Re: [GENERAL] Restaurando una base de datos

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 10:24 AM, alejandro fernandez wrote: Hace un rato baje la version 8.0 de para win, la instale y la verdad no se por donde hacer para poder restaurar el back up de mi bd; he ingresado a la opcion psql on template 1 y alli escribo psql dbname < c:\infile.bk y no ejecuta el rest

[GENERAL] ODBC Driver Issue (possibly OT - wrong list?)

2005-01-25 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I suppose this should really be on the ODBC driver list, but as I spend so much time sorting through mail already, I'm rather hoping not to need to subscribe to yet another list for this one issue... I'm trying to use a commercial handheld sync pro

Re: [GENERAL] Extended unit

2005-01-25 Thread Tom Lane
Martijn van Oosterhout writes: > We're talking here about a database with indexes to speed up > intersection tests for arbitrary polygons, extensions to handle > encryption, full text indexing and even builtin XML support. ... none of which require any extensions to the core type system. AFAICS

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 1:55 PM, Christopher Browne wrote: I haven't the foggiest idea what you can do on Windows 8.0; I thought they called it Windows XP or Windows 2000. Sorry, I meant version 8.0 of PostgreSQL on Windows (any variant it works on). I'm making the Unix-flavoured assumptions that it'

Re: [GENERAL] Recursive queries

2005-01-25 Thread Tom Lane
Martijn van Oosterhout writes: > What do you mean by resursive queries? SQL99 "WITH" syntax. See the archives. Andrew Overholt did some work in this direction a year or so back, but didn't get real far ... regards, tom lane ---(end of broadcast)

Re: [GENERAL] Recursive queries

2005-01-25 Thread Alvaro Herrera
On Tue, Jan 25, 2005 at 07:58:33PM +0100, Martijn van Oosterhout wrote: > On Mon, Jan 24, 2005 at 05:27:46PM +0100, tmp wrote: > > Are there any plans on implementing support for recursive queries in > > postgresql in the near future? If so: When? > > > > I can see there has been some discussion o

[GENERAL] Restore de Base de datos

2005-01-25 Thread alejandro fernandez
Hola lista,   le cuento que ya logre hacer el restore en postgres, tenia que modificar los codificadores y luego copiar el backup a la carpeta bin   luego desde una consola DOS ejecutar psql dbname -U username y cuando ingrese ejecutar \i backupname     gracias 

Re: [GENERAL] Recursive queries

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 08:24:54PM +0100, tmp wrote: > > What do you mean by resursive queries? A query can have a subquery > > which calls a function which executes another query. That counts as > > recursion in my book. What type of recursion are you thinking of? > > SQL:2003 defines a language

Re: [GENERAL] Extended unit

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 02:31:40PM -0500, Tom Lane wrote: > AFAICS this could easily be implemented as a user-defined type, along > the lines of > > CREATE TYPE measurement AS (value double, units text); > > and if you want to constrain a particular column to contain only one > value of uni

[GENERAL] Apparently I don't understand full outer joins....

2005-01-25 Thread Ben
I run this: select coalesce(a.n,0) as a, coalesce(b.n,0) as b, coalesce(a.s,b.s) as s from ( select 1 as n, 0 as s) a full outer join ( select 2 as n, 1 as s) b on a.s = b.s ... and get this: a | b | s ---+---+--- 1 | 0 | 0 0 | 2 | 1 (2 rows) P

Re: [GENERAL] Apparently I don't understand full outer joins....

2005-01-25 Thread Thomas F . O'Connell
Your second example is breaking the syntax of from_item ( see ). Your join_condition has to be applied to the two from_items associated by join_type. I don't think multiple join_conditions can be applied sequentially the way you're try

Re: [GENERAL] Apparently I don't understand full outer joins....

2005-01-25 Thread Richard Poole
On Tue, Jan 25, 2005 at 12:29:07PM -0800, Ben wrote: > select > coalesce(a.n,0) as a, > coalesce(b.n,0) as b, > coalesce(c.n,0) as c, > coalesce(a.s,b.s,c.s) as s > from > ( select 1 as n, 0 as s) a full outer join > ( select 1 as n, 1 as s) b full outer join >

Re: [GENERAL] Apparently I don't understand full outer joins....

2005-01-25 Thread Stephan Szabo
On Tue, 25 Jan 2005, Ben wrote: > I run this: > > select > coalesce(a.n,0) as a, > coalesce(b.n,0) as b, > coalesce(a.s,b.s) as s > from > ( select 1 as n, 0 as s) a full outer join > ( select 2 as n, 1 as s) b > on > a.s = b.s > > ... and get this: > > a | b |

Re: [GENERAL] Apparently I don't understand full outer joins....

2005-01-25 Thread Ben
Thanks guys, this works great. On Tue, 25 Jan 2005, Stephan Szabo wrote: > > Each outer join gets an on clause. You might want something like: > select > coalesce(a.n,0) as a, > coalesce(b.n,0) as b, > coalesce(c.n,0) as c, > coalesce(a.s,b.s,c.s) as s > from >

[GENERAL] Delete with a multi-column join?

2005-01-25 Thread leon-pg
Howdy! I apologize in advance for the ugly query I'm about to throw your way I need to delete some data from a table based on a multi-column join. Is there a better way to write this? delete from tbldata where unitID || '_' || variableID || '_' || cycleID in (select unitID || '_' || variab

Re: [GENERAL] Postgresql, SQL server and Oracle. Please, help

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 12:35 PM, Nadia Kunkov wrote: Hi, I was wondering where can I get documentation and especially examples on PgSQL? I've done a lot of work with Ms SQL server and need to rewrite a number of stored procedures in PgSQL. Is there a tutorial? What is the best way to start? Can

Re: [GENERAL] Extended unit

2005-01-25 Thread Tom Lane
Martijn van Oosterhout writes: > On Tue, Jan 25, 2005 at 02:31:40PM -0500, Tom Lane wrote: >> AFAICS this could easily be implemented as a user-defined type, along >> the lines of >> CREATE TYPE measurement AS (value double, units text); >> and if you want to constrain a particular column to conta

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Tom Lane
John DeSoi <[EMAIL PROTECTED]> writes: >> 2.3) Why do I need a non-administrator account to run PostgreSQL under? > Again, I think this is fine as the default, but it would be nice if it > could be changed with a setting (rather than recompiling the source). > Not all Windows users are dummies

Re: [GENERAL] Delete with a multi-column join?

2005-01-25 Thread Tom Lane
[EMAIL PROTECTED] writes: > Is there a better way to write this? > delete > from tbldata > where unitID || '_' || variableID || '_' || cycleID in > (select unitID || '_' || variableID || '_' || cycleID from > temp_data_table) delete from tbldata where (unitID, variableID, cycleID) in

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Magnus Hagander
>>> 2.3) Why do I need a non-administrator account to run >PostgreSQL under? > >> Again, I think this is fine as the default, but it would be >nice if it >> could be changed with a setting (rather than recompiling the >source). >> Not all Windows users are dummies about security and need >Po

[GENERAL] Size of data stored in bytea record?

2005-01-25 Thread Carlos
Is there a way that I can find out the size of a bytea record?  I am storing images into bytea fields and I just want to know the size of the image that it has been saved in the field

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread Magnus Hagander
>This has long been common practice in the Unix world, and is starting >to become standard practice in the Windows world as well as Microsoft >and other vendors work to improve the security of their systems. >== > >Again, I think this is fine as the default, but it would be nice if it >could

Re: [GENERAL] Delete with a multi-column join?

2005-01-25 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 04:16:29PM -0500, [EMAIL PROTECTED] wrote: > Howdy! I apologize in advance for the ugly query I'm about to throw > your way > > I need to delete some data from a table based on a multi-column join. > Is there a better way to write this? Either: delete from tbldata w

Re: [GENERAL] Size of data stored in bytea record?

2005-01-25 Thread Michael Fuhr
On Tue, Jan 25, 2005 at 04:58:33PM -0500, Carlos wrote: > Is there a way that I can find out the size of a bytea record? I am storing > images into bytea fields and I just want to know the size of the image that > it has been saved in the field See the "Binary String Functions and Operators" sec

[GENERAL] visualizing B-tree index coverage

2005-01-25 Thread TJ O'Donnell
Does anyone know of a tools that allows one to visualize the tree created by a multi-column B-tree index? A picture of a tree with branches, showing how "branchy" the tree is would be great. I'm wondering how well I've "clustered" the data in my table using the multi-column index. In other words,

Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?

2005-01-25 Thread James Thompson
On Fri, 21 Jan 2005 18:55:27 +, Chris Green <[EMAIL PROTECTED]> wrote: > > What methods are available to produce data entry forms for postgresql > > databases? If, for example, one wanted to migrate a system that used > > Oracle Forms to Postgresql what would one use? This seems to me to be

[GENERAL] Problem with Postgres V 8 and DBI maybe

2005-01-25 Thread David Siebert
I am trying to add records to a table in DBI and I keep getting an error 7 The exact error is DBD::Pg::st execute failed: at connect.pl line 107. ERROR!!! (7) INSERT INTO phonegroups VALUES ('TECHIES',1, 1) I included the statement and when I try it in pgpadmin it works fine. Any suggestions? -

Re: [GENERAL] Extended unit

2005-01-25 Thread Pailloncy Jean-Gerard
... none of which require any extensions to the core type system. AFAICS this could easily be implemented as a user-defined type, along the lines of CREATE TYPE measurement AS (value double, units text); and if you want to constrain a particular column to contain only one value of units, us

Re: [GENERAL] Extended unit

2005-01-25 Thread Tom Lane
Pailloncy Jean-Gerard <[EMAIL PROTECTED]> writes: > I do not want for each column and each row to store the value and the > unit. > I do want to put the unit in the definition of the column and the check > on the parser before any execution. If you do that, you foreclose the ability to store mi

Re: [GENERAL] visualizing B-tree index coverage

2005-01-25 Thread Dann Corbit
Useful explanation of PostgreSQL index format: http://www.faqs.org/docs/ppbook/c13329.htm I think you are aiming for the wrong thing. The worst possible index is one with every value the same. The second worst (still basically useless) is one with only two values. The greater the differentiation o

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread David Garamond
John DeSoi wrote: But on Windows 8.0 you can't run the postmaster with an administrative account, correct? I really wish this was configurable in the PostgreSQL settings (of course, defaulting to the way it is now). I think there have been several threads debating this issue in the past (on whet

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread David Garamond
[EMAIL PROTECTED] wrote: The trick is making database administration invisible to the user. Since Firebird requires no administration, it's easy. The single file database architecture in Firebird is also easy since you generally have only one drive. The decision not to create an embedded Postgres

Re: [GENERAL] Problem with Postgres V 8 and DBI maybe

2005-01-25 Thread Michael Fuhr
On Tue, Jan 25, 2005 at 05:49:11PM -0500, David Siebert wrote: > I am trying to add records to a table in DBI and I keep getting an error 7 > The exact error is DBD::Pg::st execute failed: at connect.pl line 107. > ERROR!!! (7) INSERT INTO phonegroups VALUES ('TECHIES',1, 1) Hmmm...I don't thin

Re: [GENERAL] How are foreign key constraints built?

2005-01-25 Thread Jim C. Nasby
On Tue, Jan 25, 2005 at 09:38:20AM -0600, Wes wrote: > On 1/23/05 1:01 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote: > > > If you like you can try the operation with "set > > enable_seqscan = off", but I bet it will take longer. > > Ouch! That was a big mistake. Since inquiring minds want to know,

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread John DeSoi
Hi Tom, On Jan 25, 2005, at 4:35 PM, Tom Lane wrote: Sorry, but any Windows user who thinks he doesn't need security measures equivalent to (not "beyond") minimum Unix practice is a dummy about security. Take a look at this LOAD vulnerability we're in the midst of patching, and ask yourself wheth

Re: [GENERAL] visualizing B-tree index coverage

2005-01-25 Thread TJ O'Donnell
Since I'm using a multi-column index, I can greatly influence the nature of the index created, depending on which columns I use and how many. I'm searching for an optimal set of columns that creates an index that, for sure does not have every value the same, nor only two values. Instead, I want t

Re: [GENERAL] xpath_list() question for contrib/xml2

2005-01-25 Thread John Gray
On Mon, 24 Jan 2005 16:53:47 -0800, Ron Mayer wrote: > Short summary: > >I want something like xpath_list() that returns an array >(instead of a delimited, concatenated string) when multiple >nodes exist in an XML file. It feels to me like that'd >be a better (cleaner) API. > Y

Re: [GENERAL] difficult JOIN

2005-01-25 Thread Jim C. Nasby
On Tue, Jan 25, 2005 at 05:26:50PM +0100, Thomas Chille wrote: > Hi, > > i have the following SQL-Problem: > > We are using 2 tables. The first, called plan, is holding planned working > times for employees per > tour: > > plan.id_tour > plan.id_employee > plan.begin_time > plan.end_time > > T

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-25 Thread John DeSoi
On Jan 25, 2005, at 5:02 PM, Magnus Hagander wrote: Again, I think this is fine as the default, but it would be nice if it could be changed with a setting (rather than recompiling the source). That can always be argued :-) I had a feeling it would be :) Not all Windows users are dummies about secu

Re: [GENERAL] visualizing B-tree index coverage

2005-01-25 Thread Dann Corbit
Normally, a unique, clustered index is the silver bullet to the best performance (but my experience with unique clustered indexes is largely in non-PostgreSQL database systems -- so take it with a grain of salt). I do not see any extra expense for a unique index verses one that is mostly unique.

Re: [GENERAL] visualizing B-tree index coverage

2005-01-25 Thread Dann Corbit
Some other things that are important: How much is the data in transition (updates/deletes/inserts)? If the data is mostly static or static you can add many special case indexes with little penalty. The biggest cost of indexes (besides disk space consumed) is in the slowdown of inserts, updates, a

[GENERAL] Good PostgreSQL Based Shopping Cart Software ... ?

2005-01-25 Thread Marc G. Fournier
Got a client that needs a shopping cart, and if I can help it, would rather offer them a 'ready made' package and then customize that to fit their site visually, then build everything from scratch, and only give them 10% of the features of a full package ... It doesn't have to be OSS ... Search

[GENERAL] Allow case-sensitivity without quotes

2005-01-25 Thread S Kreisler
Our implementation of Sybase allows case-sensitive referencing of objects (table/column names, etc.) in SQL statements without quote delimiters. For example, the following are equivalent: Sybase: SELECT MyColumn FROM MyTable Postgres: SELECT "MyColumn" FROM "MyTable" Can Postgres be configu

Re: [GENERAL] Recursive queries

2005-01-25 Thread tmp
> I don't think anybody has written the syntactic sugar, but someone did > write a function that provides equivalent output. I think it is important that the funcionality lies in the database engine itself: In that way it can more efficiently make use of the optimizer. Also, I think this "recursi

Re: [GENERAL] Recursive queries

2005-01-25 Thread tmp
> What do you mean by resursive queries? A query can have a subquery > which calls a function which executes another query. That counts as > recursion in my book. What type of recursion are you thinking of? No, recursion is a pretty well defined term. See http://en.wikipedia.org/wiki/Recursion S

Re: [GENERAL] Postgres+XML

2005-01-25 Thread Ron Mayer
Jan Szumiec wrote: > > Does PG allow you to store XML documents as DOM documents? > Is there such data type? If not, is it very hard to extend > the type system to include a binary representation of an > XML document? There are a few ways. I like the stuff in "contrib/xml2". There is also the "pgs

Re: [GENERAL] Good PostgreSQL Based Shopping Cart Software ... ?

2005-01-25 Thread Robby Russell
On Wed, 2005-01-26 at 00:46 -0400, Marc G. Fournier wrote: > Got a client that needs a shopping cart, and if I can help it, would > rather offer them a 'ready made' package and then customize that to fit > their site visually, then build everything from scratch, and only give > them 10% of the f

[GENERAL] text field constraint advice

2005-01-25 Thread Dale Sykora
PostgreSQL users, I would like to use a text field in a table and limit the size to reduce the chance of denial-of-service/buffer overflow/etc. I assume I can define table fields similar to the following "field_name text check (len(field) < 160)" although my syntax is probably wrong. Is check

  1   2   >