[GENERAL] Real world performance improvements in 8,2

2007-03-08 Thread CAJ CAJ
Does anyone have benchmarks for performance gains by upgrading to 8.2.x from earlier postgres versions say 8.0.x/8.1.x? Thanks!

[GENERAL] GIST index on geometry+integer

2007-03-08 Thread Arnaud Lesauvage
Hi list ! I would like to test clustering on a multicolumn GIST index. The first column is a PostGIS-geometry field, the second column is a smallint field. When I try to create the index, I have an error about GIST not being available for smallint datatype. How can I create this operator class

Re: [GENERAL] GIST index on geometry+integer

2007-03-08 Thread Oleg Bartunov
Try install contrib/btree_gist On Thu, 8 Mar 2007, Arnaud Lesauvage wrote: Hi list ! I would like to test clustering on a multicolumn GIST index. The first column is a PostGIS-geometry field, the second column is a smallint field. When I try to create the index, I have an error about GIST not

Re: [GENERAL] GIST index on geometry+integer

2007-03-08 Thread Arnaud Lesauvage
Oleg Bartunov a écrit : Try install contrib/btree_gist Thanks a lot ! Regards -- Arnaud ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Query help

2007-03-08 Thread Richard Huxton
Madison Kelly wrote: Hi all, I've got a query that looks through a table I use for my little search engine. It's something of a reverse-index but not quite, where a proper reverse index would have 'word | doc1, doc3, doc4, doc7' showing all the docs the keyword is in, mine has an entry for

Re: [GENERAL] Real world performance improvements in 8,2

2007-03-08 Thread Richard Huxton
CAJ CAJ wrote: Does anyone have benchmarks for performance gains by upgrading to 8.2.x from earlier postgres versions say 8.0.x/8.1.x? It will depend entirely on your usage patterns, I'm afraid. In general, every new version gets a little faster than the last, and there will be corner cases

[GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Richard Huxton
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 business and the "professionals" who built the tax system for a wea

Re: [GENERAL] sql formatter/beautifier

2007-03-08 Thread Aaron Bingham
Joris Dobbelsteen wrote: PostGreSQL (7.4 and onward) has such a thing build-in, but its not particulary good (simple case works, but once it gets complex it makes a mess out of it). Hi, Cleaning out my pgsql-general mail, I ran across your post. How do I invoke PostgreSQL's built-in SQL beaut

Re: [GENERAL] sql formatter/beautifier

2007-03-08 Thread Joris Dobbelsteen
If you use pgAdmin3 for example, it will format the definition in the database for you. This will exclude stored procedures, which are stored as-is. The formatter isn't too good however... There are better products on the market that will do the formatting significantly better. This one was nice

[GENERAL] DB Modeler

2007-03-08 Thread Thorsten Kraus
Hi, which tools do you use for modelling your databases? I need a tool with a graphical interface where I can create tables and relations. The tool should also be able to create the DDL for Postgres. Thanks, Thorsten ---(end of broadcast)--- TI

Re: [GENERAL] DB Modeler

2007-03-08 Thread Tino Wildenhain
Thorsten Kraus schrieb: Hi, which tools do you use for modelling your databases? I need a tool with a graphical interface where I can create tables and relations. The tool should also be able to create the DDL for Postgres. What do you mean by "also" what else should it create? ;) On Windows

Re: [GENERAL] DB Modeler

2007-03-08 Thread Hakan Kocaman
Hi, > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Thorsten Kraus > Sent: Thursday, March 08, 2007 1:12 PM > To: postgres general > Subject: [GENERAL] DB Modeler > > > Hi, > > which tools do you use for modelling your databases? I need a > t

Re: [GENERAL] DB Modeler

2007-03-08 Thread Raymond O'Donnell
On 08/03/2007 12:32, Hakan Kocaman wrote: i work with Clay in Eclipse: http://www.azzurri.jp/en/software/clay/ I use Clay also, from time to time. The only downside is that you can't print from the free version, and the commercial version isn't available outside Japan. Ray. --

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Joshua D. Drake
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 business and the "professionals" who built t

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Richard Huxton
Joshua D. Drake wrote: 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 business and the "pr

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Ted Byers
- Original Message - From: "Joshua D. Drake" <[EMAIL PROTECTED]> To: "Richard Huxton" Cc: Sent: Thursday, March 08, 2007 8:00 AM Subject: Re: [GENERAL] OT: Canadian Tax Database Richard Huxton wrote: http://www.thestar.com/News/article/189175 "For instance, in some cases the fiel

[GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
I want to tabulate time data on a weekly basis, but my data is entered on a daily basis. create table time_data { employee varchar(10), _date date, job varchar(10), amount } So I want to tabulate with a single sql command. Is that possible? If I had a separate week end table creat

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Csaba Nagy
> And due at least in part to government (and other institutions operated by > damned fools) opting for the least expensive provider rather than paying for > someone who actually knows what they're doing. Just as buying cheap junk > always comes back to get you, hiring incompetent fools that do

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Tom Lane
Omar Eljumaily <[EMAIL PROTECTED]> writes: > I want to tabulate time data on a weekly basis, but my data is entered > on a daily basis. Something involving GROUP BY date_trunc('week', _date) might work for you, if your definition of week boundaries matches date_trunc's. If not, you could probably

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Richard Huxton
Omar Eljumaily wrote: I want to tabulate time data on a weekly basis, but my data is entered on a daily basis. create table time_data { employee varchar(10), _date date, job varchar(10), amount } So I want to tabulate with a single sql command. Is that possible? Try one of these

Re: [GENERAL] How to use pg_resetxlog if data directory is in c:/Program Files ?

2007-03-08 Thread Shoaib Mir
Try using something like this --> "Program Files/PostgreSQL/data" (that is with quotes for using spaces) -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/8/07, Steven De Vriendt <[EMAIL PROTECTED]> wrote: Hi all, Got this kind of silly question. I'm trying to use pg_resetxlog. Problem

Re: [GENERAL] Importing *huge* mysql database into pgsql

2007-03-08 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, ".ep" <[EMAIL PROTECTED]> writes: > Hello, > I would like to convert a mysql database with 5 million records and > growing, to a pgsql database. > All the stuff I have come across on the net has things like > "mysqldump" and "psql -f", which sounds like I will be s

[GENERAL] foreign key support for inheritance

2007-03-08 Thread Floyd Shackelford
i would like to suggest the following modification to the foreign key syntax (and underlying implementation) to support table inheritance: alter table [only] foo add foreign key (a_field) references [only] bar (another_field) on delete restrict; the only changes from the current syntax are

Re: [GENERAL] DB Modeler

2007-03-08 Thread dje
I use case studio Thorsten Kraus a écrit : Hi, which tools do you use for modelling your databases? I need a tool with a graphical interface where I can create tables and relations. The tool should also be able to create the DDL for Postgres. Thanks, Thorsten ---(en

[GENERAL] query ... returned 4 columns

2007-03-08 Thread Sorin Schwimmer
Hi All, I'm trying to write a stored PLPG/SQL procedure: CREATE OR REPLACE FUNCTION arch_expected_stuff(CHAR(12)) RETURNS VOID AS $$ -- Archives expected_stuff -- takes packing slip DECLARE o expected_stuff%ROWTYPE; BEGIN o:= * FROM expected_stuff WHERE packslip=$1; -- LIMIT 1;

[GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread altudela
I'm a newbie in Oracle and postgreSQL, i'm need to translate the following script (in Oracle) to postgreSQL : rem Autorisation des lignes vides : set sqlbl on rem Initialisation du timer : set timing on rem Creation de la table : CREATE TABLE "LEPAPE"."EXPERIENCE"( "EXP_ID" VARCHAR2(16

[GENERAL] java.sql.SQLException: The connection attempt failed

2007-03-08 Thread Vang
Hello, I'm using postgresql 8.0.8 and I get java.sql.SQLException: The connection attempt failed when I run the jar file. On my computer I am able to run the program from netbeans and the jar file in the dist folder. However, when I send the dist folder to another computer and run the jar fil

Re: [GENERAL] No buffer space available

2007-03-08 Thread Nik
On Mar 6, 2:20 pm, [EMAIL PROTECTED] ("Andrej Ricnik-Bay") wrote: > On 3/7/07, andyk <[EMAIL PROTECTED]> wrote: > > > 1) try to use client software, which is not depends on libpq, > > or > > 2) divide your query into smaller parts, > > or > > 3) use software which parses long queries, separates the

[GENERAL] Determine users and roles

2007-03-08 Thread RPK
I want to determine the usernames, privileges and roles of the users that are created for a particular database. I am using PGSQL 8.2.3 on Windows XP. I want to run SQL query for this. -- View this message in context: http://www.nabble.com/Determine-users-and-roles-tf3360480.html#a9347822 Sent f

[GENERAL] which is more scalable for the database?

2007-03-08 Thread Timasmith
Suppose I have a database table with 20 fields which are lookups to a single table. configtable(configtable_id, a_field, something_lookup_id, another_lookup_id, ...) lookup(lookup_id, value, description, ...) what is going to be faster to map the rows to an Object which needs the 'value' for eve

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-08 Thread Reuven M. Lerner
Hi, Webb Sprague. You wrote: Do you have new \timings? Yup. It just finished executing a little while ago. With the explicitly interpolated array in place, I got the following: LOG: statement: UPDATE Transactions SET previous_value = previous_value(id) W

[GENERAL] Re: RFC tool to support development / operations work with slony replicated databases

2007-03-08 Thread Mark Stosberg
Andrew Hammond wrote: > Hello All, > > I've been working on designing a tool to facilitate both developers > and operations staff working with slony replicated databases. I think > that the problem described below is a general problem for people > working with systems that are both in production a

Re: [GENERAL] Database deadlock/hanging

2007-03-08 Thread John Gateley
On Wed, 07 Mar 2007 09:27:04 -0800 Reece Hart <[EMAIL PROTECTED]> wrote: > On Wed, 2007-03-07 at 10:08 -0600, John Gateley wrote: > > I'm guessing it's something related to table locks. > ... > > Any pointers on what I should be looking for to prevent this from > > happening again? What informatio

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

2007-03-08 Thread Tom Lane
Sorin Schwimmer <[EMAIL PROTECTED]> writes: > DECLARE > o expected_stuff%ROWTYPE; > BEGIN > o:= * FROM expected_stuff WHERE packslip=$1; -- Use SELECT * INTO o FROM expected_stuff WHERE ... The assignment syntax is currently only supported for scalar values, I believe.

Re: [GENERAL] DB Modeler

2007-03-08 Thread Tomi N/A
2007/3/8, Raymond O'Donnell <[EMAIL PROTECTED]>: On 08/03/2007 12:32, Hakan Kocaman wrote: > i work with Clay in Eclipse: > http://www.azzurri.jp/en/software/clay/ I use Clay also, from time to time. The only downside is that you can't print from the free version, and the commercial version isn

Re: [GENERAL] foreign key support for inheritance

2007-03-08 Thread Richard Huxton
Floyd Shackelford wrote: i would like to suggest the following modification to the foreign key syntax (and underlying implementation) to support table inheritance: The place to look for all these things is: http://www.postgresql.org/docs/faqs.TODO.html -- Richard Huxton Archonet Ltd --

Re: [GENERAL] which is more scalable for the database?

2007-03-08 Thread Richard Huxton
Timasmith wrote: Suppose I have a database table with 20 fields which are lookups to a single table. configtable(configtable_id, a_field, something_lookup_id, another_lookup_id, ...) lookup(lookup_id, value, description, ...) what is going to be faster to map the rows to an Object which needs

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

2007-03-08 Thread Richard Huxton
Sorin Schwimmer wrote: Hi All, I'm trying to write a stored PLPG/SQL procedure: o:= * FROM expected_stuff WHERE packslip=$1; -- LIMIT 1; Is this valid syntax? I'm a little surprised, but I think I can see what's happening. Try something more like: SELECT * INTO o FROM expected_stuf

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Ted Byers
And due at least in part to government (and other institutions operated by damned fools) opting for the least expensive provider rather than paying for someone who actually knows what they're doing. Just as buying cheap junk always comes back to get you, hiring incompetent fools that don't kn

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Guy Fraser
On Thu, 2007-03-08 at 09:15 -0500, Ted Byers wrote: > - Original Message - > From: "Joshua D. Drake" <[EMAIL PROTECTED]> > To: "Richard Huxton" > Cc: > Sent: Thursday, March 08, 2007 8:00 AM > Subject: Re: [GENERAL] OT: Canadian Tax Database > > > > Richard Huxton wrote: > >> http://ww

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Alan Hodgson
On Thursday 08 March 2007 08:15, "Ted Byers" <[EMAIL PROTECTED]> wrote: > They would have satisfied the terms of their contract > if, after a few years, and hundreds of man-years, they walked away > without delivering anything. That tragedy cost Canada hundreds of > millions, if not billions, of d

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
Thanks Tom and Richard for the tip on date_trunc. Is it possible in an sql select statement to create an iterator? For instance select myItFunc(1,10); would give 1,2,3,4,5,6,7,8,9,10 I'm a bit embarrassed that I don't know how to do this. My understanding of sql functions is that not bein

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread Kevin Hunter
On 06 Mar 2007 at 9:01a -0800, g.c[ altudela ] wrote: I'm a newbie in Oracle and postgreSQL, i'm need to translate the following script (in Oracle) to postgreSQL : rem Autorisation des lignes vides : set sqlbl on rem Initialisation du timer : set timing on rem Creation de la table : CREATE TA

[GENERAL] security permissions for functions

2007-03-08 Thread Rikard Pavelic
Hi! How can I assign execute permission to a role for a single function inside schema. For example I create schema example; function example.simple_select() and user test_user; If I grant usage on schema example to user test_user as GRANT USAGE ON SCHEMA example TO test_user; I can do select

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Alvaro Herrera
Omar Eljumaily wrote: > Thanks Tom and Richard for the tip on date_trunc. Is it possible in an > sql select statement to create an iterator? Yes, use the generate_series() function. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulti

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Tom Lane
Rikard Pavelic <[EMAIL PROTECTED]> writes: > Is this a bug or something? No, it's operating as designed. Per the GRANT reference page: : Depending on the type of object, the initial default privileges may : include granting some privileges to PUBLIC. The default is no public : access for tables,

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread Jan de Visser
On Thursday 08 March 2007 11:40:21 am Kevin Hunter wrote: > I do not know what the setting 'sqlbl' does in Oracle. SET SQLBLANKLINES ON makes sqlplus not choke on empty lines in your input. Don't get me started. jan -- -- Jan de Vis

Re: [GENERAL] Tabulate data incrementally

2007-03-08 Thread Omar Eljumaily
Thanks Alvaro. That's good to know. Actually I was spacing on the need for this. The date_trunc function with group by actually works for me. select sum(amount), date_trunc('week', period_end) as dt from time_data group by dt; Alvaro Herrera wrote: Omar Eljumaily wrote: Thanks Tom and

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Ted Byers
- Original Message - From: "Alan Hodgson" <[EMAIL PROTECTED]> To: Sent: Thursday, March 08, 2007 11:32 AM Subject: Re: [GENERAL] OT: Canadian Tax Database On Thursday 08 March 2007 08:15, "Ted Byers" <[EMAIL PROTECTED]> wrote: They would have satisfied the terms of their contract i

Re: [GENERAL] vacuum error

2007-03-08 Thread Martijn van Oosterhout
On Wed, Mar 07, 2007 at 07:07:45PM -0700, Ed L. wrote: > How would I go about correctly creating the missing file? That > sounds appealing, as if it were something I could do without > taking downtime. Is it? Depends if it's because the file got deleted prematurly, or because it's the result o

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-08 Thread Richard Broersma Jr
> LOG: statement: UPDATE Transactions > SET previous_value = previous_value(id) > WHERE new_value IS NOT NULL > AND new_value <> '' > AND node_id IN (SELECT node_id FROM NodeSegments) > LOG: duration: 16687993.067 ms

[GENERAL] group by and aggregate functions on regular expressions

2007-03-08 Thread Rhys Stewart
Hi all, i have a table with an address column. I wanted to count the number of rows with a given regex match. so i ended up with the following very verbose query: select address ~* 'magil' as Magil , address ~* 'whitewater' as whitewater, (address ~* 'inswood' or address

Re: [GENERAL] How to force planner to use GiST index?

2007-03-08 Thread Martijn van Oosterhout
On Wed, Mar 07, 2007 at 04:00:14PM -0800, [EMAIL PROTECTED] wrote: > Hi, > > I have a GiST index on st_geometry type (a user defined type). It looks > like index is not getting hit when I use some geometric operator. Here > is the example of st_contains operator. I don't know whether you noticed

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Ted Byers
> 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 >> business and the "professio

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread Shane Ambler
Kevin Hunter wrote: On 06 Mar 2007 at 9:01a -0800, g.c[ altudela ] wrote: I'm a newbie in Oracle and postgreSQL, i'm need to translate the following script (in Oracle) to postgreSQL : rem Autorisation des lignes vides : set sqlbl on rem Initialisation du timer : set timing on rem Creation de

Re: [GENERAL] group by and aggregate functions on regular expressions

2007-03-08 Thread Omar Eljumaily
select count(*), address where address ~* 'magil' or address ~* 'whitewater' etc group by address would that work? Rhys Stewart wrote: Hi all, i have a table with an address column. I wanted to count the number of rows with a given regex match. so i ended up with the following very verbose

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Omar Eljumaily
Since this thread has already degraded, I'll offer my two cents. The biggest screw ups in US history have been instigated by groups of privileged White men. I know my name may sound otherwise, but I'm a White American male, so I'm not pointing the finger at another group. Let's see, Enron, A

Re: [GENERAL] Postgres Mailing List management solution

2007-03-08 Thread Devrim GÜNDÜZ
Hi, On Tue, 2007-03-06 at 10:02 +, Desire Athow wrote: > I am looking for a email list management solution (can be a script, an > open source application etc), which uses Postgre SQL (AKA Postgres) as > database. I have done an Mailman installation some years ago that was storing all user in

Re: [GENERAL] which is more scalable for the database?

2007-03-08 Thread Shane Ambler
Timasmith wrote: Suppose I have a database table with 20 fields which are lookups to a single table. configtable(configtable_id, a_field, something_lookup_id, another_lookup_id, ...) lookup(lookup_id, value, description, ...) what is going to be faster to map the rows to an Object which needs

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Rikard Pavelic
Tom Lane wrote: No, it's operating as designed. Per the GRANT reference page: : Depending on the type of object, the initial default privileges may : include granting some privileges to PUBLIC. The default is no public : access for tables, schemas, and tablespaces; CONNECT privilege and TEMP : ta

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Bill Moran
In response to Rikard Pavelic <[EMAIL PROTECTED]>: > Tom Lane wrote: > > No, it's operating as designed. Per the GRANT reference page: > > : Depending on the type of object, the initial default privileges may > > : include granting some privileges to PUBLIC. The default is no public > > : access f

Re: [GENERAL] No buffer space available

2007-03-08 Thread Jorge Godoy
"Nik" <[EMAIL PROTECTED]> writes: > Now I wonder why is it that I started getting WSANOBUFS errors from > Windows Socket System if this same setup with the same machines has > been operational for over a year? The query size did not change and > the number of connections to the server did not chan

Re: [GENERAL] Determine users and roles

2007-03-08 Thread Jorge Godoy
RPK <[EMAIL PROTECTED]> writes: > I want to determine the usernames, privileges and roles of the users that are > created for a particular database. I am using PGSQL 8.2.3 on Windows XP. I > want to run SQL query for this. In PostgreSQL users aren't created per database but per cluster. Run the

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Ted Byers
- Original Message - From: "Bill Moran" <[EMAIL PROTECTED]> To: "Rikard Pavelic" <[EMAIL PROTECTED]> Cc: "Tom Lane" <[EMAIL PROTECTED]>; Sent: Thursday, March 08, 2007 3:18 PM Subject: Re: [GENERAL] security permissions for functions In response to Rikard Pavelic <[EMAIL PROTECTED]>

Setting week starting day (was: Re: [GENERAL] Tabulate data incrementally)

2007-03-08 Thread Jorge Godoy
Richard Huxton writes: > Omar Eljumaily wrote: >> I want to tabulate time data on a weekly basis, but my data is entered on a >> daily basis. >> >> create table time_data >> { >>employee varchar(10), >>_date date, >>job varchar(10), >>amount >> } >> >> So I want to tabulate with a

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread Scott Marlowe
On Tue, 2007-03-06 at 11:01, [EMAIL PROTECTED] wrote: > I'm a newbie in Oracle and postgreSQL, > i'm need to translate the following script (in Oracle) to postgreSQL : > > rem Autorisation des lignes vides : > set sqlbl on You don't need this, postgresql doesn't choke on extra lines. > rem Initi

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Scott Marlowe
On Thu, 2007-03-08 at 10:15, Ted Byers wrote: > > I recall being told by one project manager I knew years ago who had an > opportunity to create a bid for an RFP issued by Transport Canada (long long > ago). He refuse, so his employer prepared the bid. He refused because the > RFP was a joke

Re: [GENERAL] "oracle to postgresql" conversion

2007-03-08 Thread Devrim GÜNDÜZ
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? /me looks at Oracle docs again. -- Devrim GÜNDÜZ PostgreSQL Replic

Re: Setting week starting day (was: Re: [GENERAL] Tabulate data incrementally)

2007-03-08 Thread Alvaro Herrera
Jorge Godoy escribió: > I mean, if I wanted to do the above but instead of Sunday or Monday as the > starting day I'd like using Fridays or Wednesdays... > > Is it possible? Writing a new function shouldn't be too hard -- it's a matter > of truncating the week on a day and shifting the date forw

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Shane Ambler
Rikard Pavelic wrote: Tom Lane wrote: No, it's operating as designed. Per the GRANT reference page: : Depending on the type of object, the initial default privileges may : include granting some privileges to PUBLIC. The default is no public : access for tables, schemas, and tablespaces; CONNECT

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Rikard Pavelic
Bill Moran wrote: Hmm, so the answer to my question "How can I assign execute permission to a role for a single function inside schema." is I can't? How did you interpret "do it like this" to mean "you can't do it"? REVOKE ALL ON FROM PUBLIC; So this basically means that I can't fi

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Rikard Pavelic
Shane Ambler wrote: You can but the default is to allow the execution of all functions. You need to revoke the existing permission of executing all functions before you can allow only a single function to be run. If you want a specific function to be accessed only by selected roles then you

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Raymond O'Donnell
On 08/03/2007 22:21, Rikard Pavelic wrote: And for user2 to be able to execute example.function2() and not example.function1()? REVOKE EXECUTE ON FUNCTION example.function1() FROM user1 don't have any affect. Surely you mean - REVOKE EXECUTE ON FUNCTION example.function1() FROM user2;

Re: [GENERAL] security permissions for functions

2007-03-08 Thread David Legault
On 3/8/07, Rikard Pavelic <[EMAIL PROTECTED]> wrote: Bill Moran wrote: >> Hmm, so the answer to my question >> "How can I assign execute permission to a role for a single function >> inside schema." >> is I can't? >> > > How did you interpret "do it like this" to mean "you can't do it"? > > REVO

Re: [GENERAL] Setting week starting day

2007-03-08 Thread Jorge Godoy
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Jorge Godoy escribió: > >> I mean, if I wanted to do the above but instead of Sunday or Monday as the >> starting day I'd like using Fridays or Wednesdays... >> >> Is it possible? Writing a new function shouldn't be too hard -- it's a >> matter >> of

[GENERAL] Can psql show me where my script is broken?

2007-03-08 Thread jws
I have an enormous sql script with an incorrect insert line somewhere. I can echo the commands to stdout as they are executed, but apparently errors go to stderr. How can I determine where the problem is? ---(end of broadcast)--- TIP 2: Don't 'kill

Re: [GENERAL] Can psql show me where my script is broken?

2007-03-08 Thread Stuart Cooper
I have an enormous sql script with an incorrect insert line somewhere. I can echo the commands to stdout as they are executed, but apparently errors go to stderr. How can I determine where the problem is? from memory, if you invoke it from the shell with psql [connection options] -f filename.sql

[GENERAL] Tsearch2 / Create rule on select

2007-03-08 Thread Jean-Michel Pouré
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 become a bottleneck. When there are more than 200 users, the server slow dramatical

[GENERAL] Solaris and Ident

2007-03-08 Thread D Unit
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 can't figure o

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Omar Eljumaily
Thank God the DOI is inefficient. If they were good at what they do, which is generally malicious, we'd all be in trouble. Your story reminded me of a dear friend who works for the department of the interior here in the US who routinely was dressed down for writing functional, reliable softwar

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Bill Moran
In response to "Ted Byers" <[EMAIL PROTECTED]>: > > - Original Message - > From: "Bill Moran" <[EMAIL PROTECTED]> > > > In response to Rikard Pavelic <[EMAIL PROTECTED]>: > > > >> Tom Lane wrote: > >> > No, it's operating as designed. Per the GRANT reference page: > >> > : Depending on t

[GENERAL] Weird behaviour on a join with multiple keys

2007-03-08 Thread Charlie Clark
Hi, I'm getting unexpected results on a query which involves joining two tables on two common variables (firstname and lastname). This is the basic query: SELECT table1.lastname, table1.firstname FROM table1 INNER JOIN table2 ON (table2.name = table1.name AND table2.vorname = table1.vorname

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

2007-03-08 Thread Omar Eljumaily
What happens if you do an outer join instead of an inner join? Charlie Clark wrote: Hi, I'm getting unexpected results on a query which involves joining two tables on two common variables (firstname and lastname). This is the basic query: SELECT table1.lastname, table1.firstname FROM table

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

2007-03-08 Thread Bradley Kieser
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 system that will run with Postgres. SugarCRM seems to be the most popu

Re: [GENERAL] PG periodic Error on W2K

2007-03-08 Thread Paul Lambert
Magnus Hagander wrote: On Thu, Mar 01, 2007 at 10:45:16AM -0500, Tom Lane wrote: Magnus Hagander <[EMAIL PROTECTED]> writes: On Thu, Mar 01, 2007 at 09:44:19AM +0900, Paul Lambert wrote: I am periodically getting errors pop up on the server console of the following nature: The File or director

[GENERAL] make cascade the default?

2007-03-08 Thread jws
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'? ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] On default privilege/access behavior and how to change it?

2007-03-08 Thread Ing. Daniel Manrique
Hey all! I have a postgresql 8.0 installation we're using to give database classes. By default we create a linux user and a postgresql user (with create database permissions) and use ident authentication. Users initially use psql to connect to the template1 database; from there they create their

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

2007-03-08 Thread Brent Wood
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 system that will run with Postgres. SugarCRM se

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

2007-03-08 Thread Kenneth Downs
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 system that will run with Postgres. SugarCRM se

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

2007-03-08 Thread Steve Atkins
On Mar 8, 2007, at 6:26 PM, Brent Wood wrote: 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 C

Re: [GENERAL] Query help

2007-03-08 Thread Madison Kelly
Richard Huxton wrote: Madison Kelly wrote: Hi all, I've got a query that looks through a table I use for my little search engine. It's something of a reverse-index but not quite, where a proper reverse index would have 'word | doc1, doc3, doc4, doc7' showing all the docs the keyword is in,

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

2007-03-08 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/08/07 16:09, Charlie Clark wrote: > Hi, > > I'm getting unexpected results on a query which involves joining two > tables on two common variables (firstname and lastname). > > This is the basic query: > > SELECT table1.lastname, table1.firstna

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

2007-03-08 Thread Ron Johnson
-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 poking around some very privat

Re: [GENERAL] On default privilege/access behavior and how to change it?

2007-03-08 Thread Tom Lane
"Ing. Daniel Manrique" <[EMAIL PROTECTED]> writes: > I'd like to configure things so that: > a) users are unable to modify template1; If you're on a PG version where template1 isn't the default connection target, you could just disallow connections to it. But that might just mean that your proble

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

2007-03-08 Thread 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" I'm supposing they are of textual datatypes.

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Ted Byers
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()". But there's no real way to alter those permissions outside of changing the us

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Tom Lane
Omar Eljumaily <[EMAIL PROTECTED]> writes: > Thank God the DOI is inefficient. If they were good at what they do, > which is generally malicious, we'd all be in trouble. Guys, this was off-topic to start with ... if you'd like to argue politics please take it to some other list ...

Re: [GENERAL] security permissions for functions

2007-03-08 Thread Tom Lane
"Ted Byers" <[EMAIL PROTECTED]> writes: > ... Can > I make a function as a part of a schema that is executable only by the owner > and other functions in the schema, and no-one else, and still have a > publically callable function in that schema invoke the "private" function? Certainly --- the

Re: [GENERAL] Can psql show me where my script is broken?

2007-03-08 Thread Tom Lane
"Stuart Cooper" <[EMAIL PROTECTED]> writes: >> I have an enormous sql script with an incorrect insert line somewhere. >> I can echo the commands to stdout as they are executed, but apparently >> errors go to stderr. How can I determine where the problem is? > from memory, if you invoke it from the

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

2007-03-08 Thread Craig White
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

  1   2   >