Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Mario Guenterberg
On Fri, Mar 09, 2007 at 01:22:22AM +, Bradley Kieser wrote: > I hope that someone has cracked this one because I have run into a brick > wall the entire week and after 3 all-nighters with bad installations, I > would appreciate hearing from others! > > I am looking for a decent OpenSource CR

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread John Sidney-Woollett
centric crm works with postgres John Mario Guenterberg wrote: On Fri, Mar 09, 2007 at 01:22:22AM +, Bradley Kieser wrote: I hope that someone has cracked this one because I have run into a brick wall the entire week and after 3 all-nighters with bad installations, I would appreciate heari

Re: [GENERAL] Weird behaviour on a join with multiple keys

2007-03-09 Thread Charlie Clark
Am 09.03.2007 um 05:30 schrieb Tom Lane: Charlie Clark <[EMAIL PROTECTED]> writes: I'm getting unexpected results on a query which involves joining two tables on two common variables (firstname and lastname). That looks like it should work. Given that you describe the columns as "names"

Re: [GENERAL] Solaris and Ident

2007-03-09 Thread Richard Huxton
D Unit wrote: I've used Postgres on Linux for several years, and I have relied on the 'ident' authentication method for system administration and other tasks. Now I need to get a postgres database up and running on Solaris. The problem is that 'ident' authentication is not supported on Solaris. I

Re: [GENERAL] make cascade the default?

2007-03-09 Thread Richard Huxton
jws wrote: Is there a way at to set the 'on delete' and 'on update' options at the database or table level, so that any new foreign keys default to, say 'CASCADE', rather than 'no action'? Not as far as I know. -- Richard Huxton Archonet Ltd ---(end of broadcast)-

Re: [GENERAL] Tsearch2 / Create rule on select

2007-03-09 Thread Magnus Hagander
On Thu, Mar 08, 2007 at 09:56:23PM +0100, Jean-Michel Pouré wrote: > Dear Friends, > > I am very impressed by TSearch2 and would like to thank Oleg and the > team for their hard work. > > I would like to migrate a phpBB forum with more that 200.000 messages to > TSeach. Full text searches have be

[GENERAL] Can i run pg_ctl under Administrator account ?

2007-03-09 Thread Steven De Vriendt
Using Windows Xp I want to start pg_ctl as administrator. Reason for that I'm using Apache Tomcat and I can't seem to start that without Administrator privilges. Can someone tell me how do that ? Regards, Steven ---(end of broadcast)--- TIP 6: expl

Re: [GENERAL] Can i run pg_ctl under Administrator account ?

2007-03-09 Thread Richard Huxton
Steven De Vriendt wrote: Using Windows Xp I want to start pg_ctl as administrator. Reason for that I'm using Apache Tomcat and I can't seem to start that without Administrator privilges. Can someone tell me how do that ? 1. Can you not use "runas"? 2. I thought this was dealt with in 8.2 and PG

Re: [GENERAL] Can i run pg_ctl under Administrator account ?

2007-03-09 Thread Magnus Hagander
On Fri, Mar 09, 2007 at 12:12:42PM +0100, Steven De Vriendt wrote: > Using Windows Xp I want to start pg_ctl as administrator. > Reason for that I'm using Apache Tomcat and I can't seem to start that > without Administrator privilges. > Can someone tell me how do that ? Make sure you use 8.2 and i

[GENERAL] Beginner's Questions

2007-03-09 Thread Don Lavelle
Hey, All, I'm working on a project (for a friend and for self-education) and want to learn a little more about what sorts of applications PostgreSQL is used for. I'm currently looking at a single-computer desktop application that may be scaled to a client-server model with multiple deskt

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread tom
I'm running my database on a Pentium 2 with 450MHz CPU. It runs dbmail and spamassassin's Bayes and has overhead available. You'll find it works well enough for your database size. As for being it overkill. I think you've answered your own questions: I don't have to write as much code -- less bu

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Jorge Godoy
Don Lavelle <[EMAIL PROTECTED]> writes: > My database is quite small (only 13 lucky tables, though that may expand a > little) and will not hold a great amount of data. (There will be at most > records in the thousands for the single-user or tens of thousands for the > multi-user.) I will eith

Re: [GENERAL] security permissions for functions

2007-03-09 Thread Bill Moran
In response to "Ted Byers" <[EMAIL PROTECTED]>: > > > > Functions are controlled by the same ACL mechanism that tables and > > everything > > else follows. Thus you have the idea of "user id X may do Y with object > > Z" > > i.e. "user "barbara" may "execute" function "somefunction()". > > > > B

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/08/07 20:38, Kenneth Downs wrote: [snip] Management and we are about to add the CRM to it so that the scheduling/billing database also serves the doctor's public website, Is that wise? One bug and a cracker is pok

[GENERAL] Error code associated to "could not open relation with OID ..."

2007-03-09 Thread Galantucci Giovanni
Hi all, I'm using jdbc to connect to a remote database and this morning I've found an SQLException on my log file with this error description: "could not open relation with OID ...". Does anyone know which error code is associated to such exception? Thanks in advance Giovanni Galantucci I

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/07 06:03, Don Lavelle wrote: > Hey, All, > > I'm working on a project (for a friend and for self-education) and want > to learn a little more about what sorts of applications PostgreSQL is > used for. I'm currently looking at a single-comput

Re: [GENERAL] Error code associated to "could not open relation with OID ..."

2007-03-09 Thread Richard Huxton
Galantucci Giovanni wrote: Hi all, I'm using jdbc to connect to a remote database and this morning I've found an SQLException on my log file with this error description: "could not open relation with OID ...". Does anyone know which error code is associated to such exception? It's usually do

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Walter Vaughan
Bradley Kieser wrote: I am looking for a decent OpenSource CRM system that will run with Postgres. OpenTAPS the demo won't even work. And it's US-centric whereas we are in the UK. A pity that it's so very much tied to the US as it could be very good. What actually didn't work with OpenTaps

[GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Rick Schumeyer
I'm developing a system using Ruby on Rails (with ActiveRecord) and postgres. (Although I think my question is still relevant for, say, java with hibernate.) I have two classes (tables): users and employees. A user is an account that can logon to the system, while an employee is...umm...an

Re: [GENERAL] Weird behaviour on a join with multiple keys

2007-03-09 Thread Tom Lane
Charlie Clark <[EMAIL PROTECTED]> writes: > psytec=# show lc_collate; > lc_collate > - > de_DE.UTF-8 > (1 row) > psytec=# show server_encoding; > server_encoding > - > LATIN1 > (1 row) There's your problem right there. The string comparison routines are built on strco

[GENERAL] Bitmap AND multicolumn index used !

2007-03-09 Thread Arnaud Lesauvage
Hi list ! I have a quite large table with a PostGIS-geometry field (~25M rows) representing road segments. The segments are classified in 9 classes (from 0 to 8), based on their importance. I am trying some different methods for optimizing queries on this table. I decided to try with a multicol

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Karsten Hilbert
On Fri, Mar 09, 2007 at 08:08:11AM -0500, Kenneth Downs wrote: > First, security is defined directly in terms of tables, it is not > arbitrated by code. The "public" group has SELECT access to the > articles table and the schedules tables, that's it. If a person figures > out how our links wo

[GENERAL] Tracking disk writes?

2007-03-09 Thread Erik Jones
I've seen that I can get the total number of blocks read from disk over the lifetime of a database via the pg_stat_database view, and by taking successive readings I can track reads over time. How can I track disk writes? erik jones <[EMAIL PROTECTED]> sofware developer 615-296-0838 emma(

R: [GENERAL] Error code associated to "could not open relation with OID ..."

2007-03-09 Thread Galantucci Giovanni
I don't use temporary tables in my application. >From a previous post I've understood that this error could happen if I'm >trying to access a table whose corresponding row in the pg_class table is >being modified. So I wanted to catch the error code of such exception to retry >a second insert in

Re: [GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Jorge Godoy
Rick Schumeyer <[EMAIL PROTECTED]> writes: > I can think of two ways to do this: > > 1) a 1-1 relationship where the user table contains a FK to the employee > table. Since not all users will be employees, the FK will sometimes be null. > In rails, the user class would "belong_to employee" while

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Karsten Hilbert wrote: On Fri, Mar 09, 2007 at 08:08:11AM -0500, Kenneth Downs wrote: First, security is defined directly in terms of tables, it is not arbitrated by code. The "public" group has SELECT access to the articles table and the schedules tables, that's it. If a person figures

Re: [GENERAL] security permissions for functions

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 01:07:23 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: > > Certainly --- the point here is merely that that isn't the *default* > behavior. We judged quite some time ago that allowing public execute > access was the most useful default. Perhaps that was a bad choice, but >

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Thu, Mar 08, 2007 at 20:32:22 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > As I said, it is easy with a function. :-) I was just curious to see if we > had something like Oracle's NEXT_DAY function or something like what I > described (SET BO

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Michael Schmidt
Don, It sounds like your project is similar to mine. My app is a scientific database that contains journal articles and data related to neuropsychological assessment. The goal is to support evidence-based clinical practice as well as to serve as a basis for research and a book I am working on.

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread Guy Fraser
Sorry everyone, my bad, but I should have expected it. I was not denigrating anyone, if you actually read what I said you can not conclude that I was. My entire point was that the Government does not hire the best qualified hardest working people regardless of their sex, culture, origin or any o

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kevin Hunter
First, security is defined directly in terms of tables, it is not arbitrated by code. The "public" group has SELECT access to the articles table and the schedules tables, that's it. If a person figures out how our links work and tries to access the "claims" table it will simply come up blank

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Thu, Mar 08, 2007 at 20:32:22 -0300, > Jorge Godoy <[EMAIL PROTECTED]> wrote: >> Alvaro Herrera <[EMAIL PROTECTED]> writes: >> >> As I said, it is easy with a function. :-) I was just curious to see if we >> had something like Oracle's NEXT_DAY

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Bill Moran
In response to Kevin Hunter <[EMAIL PROTECTED]>: > >>> First, security is defined directly in terms of tables, it is not > >>> arbitrated by code. The "public" group has SELECT access to the > >>> articles table and the schedules tables, that's it. If a person > >>> figures out how our links

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Karsten Hilbert
On Fri, Mar 09, 2007 at 11:02:45AM -0500, Kenneth Downs wrote: > >>First, security is defined directly in terms of tables, it is not > >>arbitrated by code. The "public" group has SELECT access to the > >>articles table and the schedules tables, that's it. If a person figures > >>out how our

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/07 10:02, Kenneth Downs wrote: > Karsten Hilbert wrote: >> On Fri, Mar 09, 2007 at 08:08:11AM -0500, Kenneth Downs wrote: >> >> >>> First, security is defined directly in terms of tables, it is not >>> arbitrated by code. The "public" group

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Karsten Hilbert wrote: If the user figures out our URL scheme, they might try something like "?gp_page=patients" and say "Wow I'm clever I'm going to look at the patients table", except that the public user has no privilege on the table. The db server will throw a permission denied error.

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Alvaro Herrera
Jorge Godoy escribió: > Just to repeat my question: > > (I don't want to write a function, I can do that pretty easily... And I was > asking if there existed some feature on the database that... It's just a > curiosity) > > Given a date X it would return me the first day of the week so that

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/07 10:02, Kenneth Downs wrote: Karsten Hilbert wrote: On Fri, Mar 09, 2007 at 08:08:11AM -0500, Kenneth Downs wrote: First, security is defined directly in terms of tables, it is not arbitrated by code

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
I think you can coax the date_trunc function to give you a proper start day. I think it's more than adding an integer to your date, though. You also have to do some mod work after the function returns, I think. I agree that the point isn't that you can't do it with some effort, however. It'

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Martin Gainty
Karsten- You would need some manner of DML operation to take place (in this way the DB trigger could sense the change in DB state to activate e-mail) Otherwise you could do so at your Webapp login Does this answer your question? Tak Martin--

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Kevin Hunter wrote: If a user has not logged in, that is, if they are an anonymous visitor, the web framework will connect to the database as the default "public" user. Our system is deny-by-default, so this user cannot actually read from any table unless specifically granted permission. I

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Bill Moran wrote: If a user has not logged in, that is, if they are an anonymous visitor, the web framework will connect to the database as the default "public" user. Our system is deny-by-default, so this user cannot actually read from any table unless specifically granted permission. In the

[GENERAL] Statistics

2007-03-09 Thread Ezequias Rodrigues da Rocha
On Fri, 2007-03-09 at 14:22 -0300, Ezequias Rodrigues da Rocha wrote: Does someone have statistcs from PostgreSQL ? Numbers from the list, performance statistics. I must argue with another person the idea of do not put Oracle in our organization. We are quite well with postgresql and I have no p

Re: [GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 10:06:52 -0500, Rick Schumeyer <[EMAIL PROTECTED]> wrote: > > From a business rules perspective: > Some users are not employees (like an admin user) > Some employees are not users > > I can think of two ways to do this: > > 1) a 1-1 relationship where the user table

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Jorge Godoy escribió: > >> Just to repeat my question: >> >> (I don't want to write a function, I can do that pretty easily... And I was >> asking if there existed some feature on the database that... It's just a >> curiosity) >> >> Given a date X

[GENERAL] Sw to generate ER model

2007-03-09 Thread bcochofel
Hi, where can I find a SW that can connect to a postgres DB and create the ER model? ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] PostgreSQL to Oracle

2007-03-09 Thread Martin Gainty
Ezequias- first you will need to pg_dump everything.. schema..tables..functions then your Data into a text format which has no whitespace characters There are 2 bulk loaders available from Oracle 1)Brand new DataPump 2)Tried and true sqlldr (which I recommend) I would highly recommend reading and

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kevin Hunter
What about an SQL injection bug that allows for increased privileges? Um, web programming 101 is that you escape quotes on user-supplied inputs. That ends SQL injection. Pardon my naivete (I'm fairly new to web/DB programming) . . . is this the current standard method of protection from SQL

Re: [GENERAL] Sw to generate ER model

2007-03-09 Thread Richard Broersma Jr
> Hi, where can I find a SW that can connect to a postgres DB and create > the ER model? Shoaib, put together a really nice list of such software on this thread: http://archives.postgresql.org/pgsql-general/2006-11/msg00721.php Hope this helps. Regards, Richard Broersma Jr. ---

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Kenneth Downs
Kevin Hunter wrote: What about an SQL injection bug that allows for increased privileges? Um, web programming 101 is that you escape quotes on user-supplied inputs. That ends SQL injection. Pardon my naivete (I'm fairly new to web/DB programming) . . . is this the current standard method o

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-09 Thread Scott Marlowe
On Thu, 2007-03-08 at 16:05, Devrim GÜNDÜZ wrote: > Hi, > > On Fri, 2007-03-09 at 05:21 +1030, Shane Ambler wrote: > > NUMBER is Oracle's version of NUMERIC - Oracle will use both but > > probably only Oracle will use NUMBER. > > Really? I thought Oracle's NUMBER ~ PostgreSQL's (BIG)INT? Not s

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 14:59:35 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > It is not hard to calculate, as you can see... but it would be nice if > "date_trunc('week', date)" could do that directly. Even if it became > "date_trunc('week', date, 4)" or "date_trunc('week', date, 'Wednesday')

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Sven Willenberger
On Fri, 2007-03-09 at 01:22 +, Bradley Kieser wrote: > I hope that someone has cracked this one because I have run into a brick > wall the entire week and after 3 all-nighters with bad installations, I > would appreciate hearing from others! > > I am looking for a decent OpenSource CRM syste

[GENERAL] PostgreSQL to Oracle

2007-03-09 Thread Ezequias Rodrigues da Rocha
Hi list, Is it a simple action to convert a database from PostgreSQL to Oracle ? I mean a simple database with 33 tables 8 functions 31 sequencies 2 triggers 1 type 3 views Has someone any idea ? -- Ezequias Rodrigues da Rocha http://ezequiasrocha.blogspot.com/ use Mozilla Firefox:http://br.m

Re: [GENERAL] [SQL] PostgreSQL to Oracle

2007-03-09 Thread Jonah H. Harris
On 3/9/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote: Is it a simple action to convert a database from PostgreSQL to Oracle ? Yes, relatively. Has someone any idea ? There's a couple ways to do this, but I'd recommend first using pg_dump to export schema only. Your functions an

Re: [GENERAL] Sw to generate ER model

2007-03-09 Thread Oleg Bartunov
I'm happy with dbwrench (http://www.dbwrench.com/) ! btw, it'd be quite useful to have this list on www.postgresql.org On Fri, 9 Mar 2007, Richard Broersma Jr wrote: Hi, where can I find a SW that can connect to a postgres DB and create the ER model? Shoaib, put together a really nice list of

Re: [GENERAL] [SQL] PostgreSQL to Oracle

2007-03-09 Thread Ezequias Rodrigues da Rocha
Thank you Jonah, That isn't a decision taken but I will need to argue with the new team of my new company. I can't see why but I will see how the things occurs. Thank you again Ezequias 2007/3/9, Jonah H. Harris <[EMAIL PROTECTED]>: On 3/9/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wr

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Brandon Aiken
Why is running on PG so important? Why not look for the best CRM application for your user's needs? -- Brandon Aiken CS/IT Systems Engineer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bradley Kieser Sent: Thursday, March 08, 2007 8:22 PM To: pgsql-ge

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Fri, Mar 09, 2007 at 14:59:35 -0300, > Jorge Godoy <[EMAIL PROTECTED]> wrote: >> It is not hard to calculate, as you can see... but it would be nice if >> "date_trunc('week', date)" could do that directly. Even if it became >> "date_trunc('week',

[GENERAL] Trigger for Audit Table

2007-03-09 Thread Bill Moseley
I'm asking for a sanity check: This is a very simple audit table setup where I use a BEFORE UPDATE trigger to save an existing record. The table stores templates (for a CMS) and looks something like this: create table template ( id SERIAL PRIMARY KEY, path

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Merlin Moncure
On 3/9/07, Brandon Aiken <[EMAIL PROTECTED]> wrote: Why is running on PG so important? Why not look for the best CRM application for your user's needs? probably because he wants to interface his own systems on it that are already running on postgresql. merlin ---(end

Re: [GENERAL] Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread Steve Atkins
On Mar 9, 2007, at 11:35 AM, Brandon Aiken wrote: Why is running on PG so important? Why not look for the best CRM application for your user's needs? There can be many reasons - mostly related to the fact that the business needs are at least as important, if not more so, than the user needs.

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-09 Thread Chris Fischer
All of Oracle's (non-float) number types are variable size numbers with an ordinal and a mantissa. This makes Oracle number very efficient for smaller values as compared to fixed size integers, but less efficient with larger values. NUMBER has a maximum precision of 38 digits with a scale of -

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/07 14:53, Chris Fischer wrote: > All of Oracle's (non-float) number types are variable size > numbers with an ordinal and a mantissa. This makes Oracle number > very efficient for smaller values as compared to fixed size > integers, but less

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 16:44:57 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > Bruno Wolff III <[EMAIL PROTECTED]> writes: > > > On Fri, Mar 09, 2007 at 14:59:35 -0300, > > Jorge Godoy <[EMAIL PROTECTED]> wrote: > >> It is not hard to calculate, as you can see... but it would be nice if > >>

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Karsten Hilbert
On Fri, Mar 09, 2007 at 12:22:19PM -0500, Kenneth Downs wrote: > >My interest was more towards the "we get an email" part. > >What level do you send that from ? A trigger ? > > > The web framework does that. I see. IOW if a violation happens below the web layer the e-mail doesn't get send. I thoug

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Ted Byers
It is not hard to calculate, as you can see... but it would be nice if "date_trunc('week', date)" could do that directly. Even if it became "date_trunc('week', date, 4)" or "date_trunc('week', date, 'Wednesday')" it would be nice... :-) And that is what I was trying to ask ;-) Use date_trun

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
Ted, my reason for asking the question that I believe precipitated this thread was that I wanted a single sql statement that aggregated time data by week. Yes, I could do the aggregation subsequently in my own client side code, but it's easier and less error prone to have it done by the server

Re: [GENERAL] Weird behaviour on a join with multiple keys

2007-03-09 Thread Charlie Clark
Am 09.03.2007 um 16:15 schrieb Tom Lane: psytec=# show lc_collate; lc_collate - de_DE.UTF-8 (1 row) psytec=# show server_encoding; server_encoding - LATIN1 (1 row) There's your problem right there. The string comparison routines are built on strcoll(), which is

[GENERAL] Yet another PostgreSQL C++ binding

2007-03-09 Thread Phil Endecott
Dear All, I've written a C++ PostgreSQL interface library which I use in a couple of open-source applications, and I thought that I would mention it here in case it could be of use to anyone. Yes, I know there are already several such libraries, but I believe mine has a unique feature: queri

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Don Lavelle
Hi, all, Thank you all for your help! From what I've gathered, similarly sized projects run on 100 MB of disk space and a 450 MHz processor. My GUI and application logic aren't going to need much more than that, so I should be good to go! PostgreSQL it is! I'm sure I will have many, ma

Re: [GENERAL] Weird behaviour on a join with multiple keys

2007-03-09 Thread Tom Lane
Charlie Clark <[EMAIL PROTECTED]> writes: > Am 09.03.2007 um 16:15 schrieb Tom Lane: >> There's your problem right there. The string comparison routines are >> built on strcoll(), which is going to expect UTF8-encoded data because >> of the LC_COLLATE setting. If there are any high-bit-set LATIN1

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Ted Byers
- Original Message - From: "Omar Eljumaily" <[EMAIL PROTECTED]> To: "Ted Byers" <[EMAIL PROTECTED]> Cc: Sent: Friday, March 09, 2007 5:00 PM Subject: Re: [GENERAL] Setting week starting day Ted, my reason for asking the question that I believe precipitated this thread was that I wan

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III <[EMAIL PROTECTED]> writes: > No, it has to be inside the function so that the modular arithmetic is > applied to it. Then there's the error I've shown from your command. Can you give me a working one? This was with PostgreSQL 8.2.3. -- Jorge Godoy <[EMAIL PROTECTED]> --

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
"Ted Byers" <[EMAIL PROTECTED]> writes: > Out of curiosity, why does the database need to know this, or to be able to > calculate it? There are lots of things that would be useful to me, if the It was a curiosity. But it would make working with some dates easier. I've given some examples but i

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Omar Eljumaily <[EMAIL PROTECTED]> writes: > Ted, my reason for asking the question that I believe precipitated this thread > was that I wanted a single sql statement that aggregated time data by week. > Yes, I could do the aggregation subsequently in my own client side code, but > it's easier and

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
"Ted Byers" <[EMAIL PROTECTED]> writes: > I don't buy the suggestion that server side code is less error prone that > client side code, but be that as it may, we're talking about a function that > has one line of code. And given what you just said, you don't want the day of > the week, you want

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Damian C
We produce and sell a Java desktop app, distributed in an office (~1-10 Users), with Postgres as the central data store. The users are "technically illiterate", and they often have very low spec hardware. It does all work very well. Note that for postgres you will need NTFS (WIN32 is not possibl

Re: [GENERAL] Trigger for Audit Table

2007-03-09 Thread Tom Lane
Bill Moseley <[EMAIL PROTECTED]> writes: > I'm asking for a sanity check: > And then an audit table: > create table template_history ( > id SERIAL PRIMARY KEY, > template_id integer NOT NULL REFERENCES template ON DELETE > CASCADE, > path

Re: [GENERAL] Trigger for Audit Table

2007-03-09 Thread Bill Moseley
On Fri, Mar 09, 2007 at 06:50:39PM -0500, Tom Lane wrote: > Bill Moseley <[EMAIL PROTECTED]> writes: > > I'm asking for a sanity check: > > > And then an audit table: > > > create table template_history ( > > id SERIAL PRIMARY KEY, > > template_id inte

Re: [GENERAL] Statistics

2007-03-09 Thread Jeff Davis
On Fri, 2007-03-09 at 14:40 -0300, Ezequias Rodrigues da Rocha wrote: > > On Fri, 2007-03-09 at 14:22 -0300, Ezequias Rodrigues da Rocha wrote: > Does someone have statistcs from PostgreSQL ? Numbers from the list, > performance statistics. I must argue with another person the idea of > > do n

Re: [GENERAL] Trigger for Audit Table

2007-03-09 Thread Tom Lane
Bill Moseley <[EMAIL PROTECTED]> writes: > On Fri, Mar 09, 2007 at 06:50:39PM -0500, Tom Lane wrote: >> This is not going to work because the row's not there yet. > This is a BEFORE *UPDATE* trigger, not a BEFORE INSERT, so the row is > there. The audit table is written when the primary record ch

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 20:13:11 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > Bruno Wolff III <[EMAIL PROTECTED]> writes: > > > No, it has to be inside the function so that the modular arithmetic is > > applied to it. > > Then there's the error I've shown from your command. Can you give me

Re: HIPPA (was Re: [GENERAL] Anyone know ...)

2007-03-09 Thread Tom Lane
Kenneth Downs <[EMAIL PROTECTED]> writes: > The biggest security limitation we have is actually a weakness in > Postgres - the inability to restrict the abilities of a user with > CREATUSER rights, they can make somebody who can do anything. For > higher security this requires no ability for pu

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Fri, Mar 09, 2007 at 20:13:11 -0300, > Jorge Godoy <[EMAIL PROTECTED]> wrote: >> Bruno Wolff III <[EMAIL PROTECTED]> writes: >> >> > No, it has to be inside the function so that the modular arithmetic is >> > applied to it. >> >> Then there's th

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 23:07:26 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > > But how to get the date if the first day of the week is a Wednesday? This > example is like the ones I've sent with separate queries that needed being > combined -- in a function, probably -- to get the desired r

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Omar Eljumaily
But you're always returning Monday, right? Your grouping will be correct, but to get the actual truncation date, you have to subtract back. select (date_trunc('week', '2007-03-07'::date + 5)::date-5); select (date_trunc('week', '2007-03-06'::date + 5)::date-5); select (date_trunc('week', '2007-

[GENERAL] Re: Anyone know a good opensource CRM that actually installs with Posgtres?

2007-03-09 Thread lneves
Hello, Bradley Kieser wrote: I hope that someone has cracked this one because I have run into a brick wall the entire week and after 3 all-nighters with bad installations, I would appreciate hearing from others! [...] Compiere doesn't support PG. You could checkout Adempiere wich is a

Re: [GENERAL] Trigger for Audit Table

2007-03-09 Thread [EMAIL PROTECTED]
You can/should create it as an AFTER UPDATE trigger. The OLD row will contain the previous values. eg: INSERT INTO template_history ( template_id, path, content, last_updated_time, person ) values (OLD.id, OLD.path, OLD.content, OLD.last_updated_time, OLD.person); On Mar 9, 2:45 pm, [EMA

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Richard Huxton wrote: % http://www.thestar.com/News/article/189175 % % "For instance, in some cases the field for the social insurance number % was instead filled in with a birth date." % % Unbelievable. Sixty years of electronic computing, fifty years use in %

Re: [GENERAL] Solaris and Ident

2007-03-09 Thread D Unit
I can't get the .pgpass file working. I think the problem may have to do with the fact that the user's home directory is '/'. Is there a way to specify a different location for .pgpass other than '~/.pgpass'? -- View this message in context: http://www.nabble.com/Solaris-and-Ident-tf3371429.h

[GENERAL] Is This A Set Based Solution?

2007-03-09 Thread Stefan Berglund
Hi- Below is a small test case that illustrates what I'm attempting which is to provide a comma separated list of numbers to a procedure which subsequently uses this list in a join with another table. My questions are is this a set based solution and is this the best approach in terms of using th

Re: [GENERAL] query ... returned 4 columns

2007-03-09 Thread Sorin Schwimmer
Thank you, indeed SELECT * INTO o ... solves it. One last question, if I may: both expected_stuff and archive.expected_stuff are defined as: ( source CHAR(2); warehouse CHAR(1); stuff SMALLINT; packslip CHAR(12) ); and o is expected_stuff%ROWTYPE Having the same structure, I put INSERT

[GENERAL] index bloat problem

2007-03-09 Thread Monika Cernikova
I use Postgres 8.1 on linux I have several tables to which I need insert about 200-500 records per minute. Records contains timestamp (actual time), and this timestamp is part of primary key and index. I need to keep data for 1 month. I daily delete data older than 1 month and than run vacuum

Re: [GENERAL] Tsearch2 / Create rule on select

2007-03-09 Thread Jean-Michel Pouré
Le vendredi 09 mars 2007 à 10:58 +0100, Magnus Hagander a écrit : > No idea. Assuming you want to do it beforehand. otherwise, just create > the index and see how large it got? Thank you for your comments. I will add TSeach2 support to phpBB 3.x soon. I had incredible response time on simple que

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Fri, Mar 09, 2007 at 23:07:26 -0300, > Jorge Godoy <[EMAIL PROTECTED]> wrote: >> >> But how to get the date if the first day of the week is a Wednesday? This >> example is like the ones I've sent with separate queries that needed being >> combin

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/07 00:12, Patrick TJ McPhee wrote: [snip] > > To be fair, this is not "the tax system". It's a staging database > used for electronic filing, and it's pretty common to use typeless > databases in the first stage of that sort of application.

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Omar Eljumaily <[EMAIL PROTECTED]> writes: > But you're always returning Monday, right? Your grouping will be correct, but > to get the actual truncation date, you have to subtract back. > > select (date_trunc('week', '2007-03-07'::date + 5)::date-5); > select (date_trunc('week', '2007-03-06'::da

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Bruno Wolff III
On Sat, Mar 10, 2007 at 00:03:04 -0300, Jorge Godoy <[EMAIL PROTECTED]> wrote: > > If I run this query: > >select date_trunc('week', '2007-03-08'::date + 5); > > it fails even for that date. The correct answer, would be 2007-03-07 and not > 2007-03-12. I want the first day of the week to

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread omar
Tom, I promise this isn't a political statement, even though it's on the same thread. I'm curious what people think about the following statement considering the database typing talk being brought up here. My experience is that more times than not I have to put data validation in my client co

  1   2   >