Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-25 Thread Bruno Wolff III
On Sat, Dec 24, 2005 at 08:41:49 -0400, robert mena [EMAIL PROTECTED] wrote: If I'd need to define a user with SELECT privileges to all tables in my test database, how could I do that? You can't. You can write a script that will give them access to all of the tables that currently exist.

Re: [GENERAL] query for a time interval

2005-12-23 Thread Bruno Wolff III
On Wed, Dec 21, 2005 at 11:52:56 -0800, Mark [EMAIL PROTECTED] wrote: Hello everybody, I'm looking for an elegant SQL statement that will work in Postgresql, MySQL and ORACLE. The query will be executed by Java client. To have this query for Postgresql is priority number one. In

Re: [GENERAL] to_char() Question

2005-12-14 Thread Bruno Wolff III
On Tue, Dec 13, 2005 at 11:30:36 -0500, Terry Lee Tucker [EMAIL PROTECTED] wrote: On Tuesday 13 December 2005 11:20 am, John Sidney-Woollett saith: Not sure if there is a numeric formatting option that allows what you want. But how about? substr(to_char(1029, '9,999'),2) That's

Re: [GENERAL] missing something obvious about intervals?

2005-12-12 Thread Bruno Wolff III
On Mon, Dec 12, 2005 at 13:04:05 -0500, Jim Buttafuoco [EMAIL PROTECTED] wrote: try select '2005-12-01'::date + (456.5::float || ' seconds')::interval; ?column? 2005-12-01 00:07:36.50 (1 row) You are better off doing a multiply. Something

Re: [GENERAL] Performance large tables.

2005-12-11 Thread Bruno Wolff III
Please start new threads to ask unrelated questions, rather than replying to an existing thread. This makes the archives less useful, and may keep people from seeing your question. On Sat, Dec 10, 2005 at 15:37:01 -0800, Benjamin Arai [EMAIL PROTECTED] wrote: To be more specific, there are

Re: [GENERAL] PL/pgSQL : notion of deferred execution

2005-12-11 Thread Bruno Wolff III
On Sun, Dec 11, 2005 at 16:31:59 +0100, Frank van Vugt [EMAIL PROTECTED] wrote: Ratio: when deferred triggers on table A are used to calculate field values of table B (which then obviously need an update), one might want to prevent direct updates on these fields of table B It might

Re: [GENERAL] Slow COUNT

2005-12-04 Thread Bruno Wolff III
On Sun, Dec 04, 2005 at 14:40:49 +0100, Tino Wildenhain [EMAIL PROTECTED] wrote: Doing something to enable aggregates in general to use an existent index would be a nice ide imho. (With all the visibility hinting in place) Assuming you are refering to max and min, this has already been

Re: [GENERAL] Slow COUNT

2005-12-04 Thread Bruno Wolff III
On Sun, Dec 04, 2005 at 18:28:53 +0100, Tino Wildenhain [EMAIL PROTECTED] wrote: Am Sonntag, den 04.12.2005, 09:56 -0600 schrieb Bruno Wolff III: On Sun, Dec 04, 2005 at 14:40:49 +0100, Tino Wildenhain [EMAIL PROTECTED] wrote: Doing something to enable aggregates in general to use

Re: [GENERAL] Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

2005-12-03 Thread Bruno Wolff III
On Sat, Dec 03, 2005 at 11:43:00 -0500, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: On Fri, Dec 02, 2005 at 07:37:49PM -0500, Tom Lane wrote: So the product I fancifully mentioned would weigh in somewhere around 10^300, and thus be *well* within the

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Bruno Wolff III
On Wed, Nov 30, 2005 at 20:44:30 -0500, John D. Burger [EMAIL PROTECTED] wrote: That changes the semantics of what I want. If I group by personID above, then every FOUR-way combo is of course unique. What I'd like to do is group by the three attributes, and select for personID as well.

Re: [GENERAL] SQL Help: Multiple LEFT OUTER JOINs

2005-11-21 Thread Bruno Wolff III
On Mon, Nov 21, 2005 at 05:40:10 -0800, Bill Moseley [EMAIL PROTECTED] wrote: Here's where I'm missing something. Trying to do an outer join on to bring in the class row with its class_time column: You don't say exactly why you are having a problem with this, but I think you would be

Re: [GENERAL] TSearch2 Questions

2005-11-21 Thread Bruno Wolff III
On Mon, Nov 21, 2005 at 16:50:00 +0300, Oleg Bartunov oleg@sai.msu.su wrote: On Mon, 21 Nov 2005, Hannes Dorbath wrote: I'm playing a bit with it ATM. Indexing one Gigabyte of plain text worked well, with 10 GB I yet have some performance problems. I read the TSearch Tuning Guide and

Re: [GENERAL] Group By?

2005-11-21 Thread Bruno Wolff III
On Mon, Nov 21, 2005 at 15:53:15 -0800, Bob Pawley [EMAIL PROTECTED] wrote: I want to take the serial ID of several values in different rows in one table and insert them into a single row of another table. Would the 'group by' command be the best way to do this? From your description I

Re: [GENERAL] Group By?

2005-11-21 Thread Bruno Wolff III
On Mon, Nov 21, 2005 at 21:53:10 -0800, Bob Pawley [EMAIL PROTECTED] wrote: Here's what I want to do. Table control contains values (mon and valves) that are associated by numbers inserted into the associated column. I want to transfer the serial _id number of the items associated by

Re: [GENERAL] Very slow queries on 8.1

2005-11-17 Thread Bruno Wolff III
On Thu, Nov 17, 2005 at 11:31:27 -0500, David Rysdam [EMAIL PROTECTED] wrote: Right, it's about 100k rows and it is through libpq (pgadmin in this case, but my app uses libpq from pgtcl). Is there a way to tell libpq to not do what it likes and do what I need instead? I didn't see

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread Bruno Wolff III
On Thu, Nov 17, 2005 at 09:23:51 -0800, Robby Russell [EMAIL PROTECTED] wrote: CREATE TABLE product ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL DEFAULT '', ); And depending on why you chose VARCHAR(255), you may really want to use TEXT instead. ---(end

Re: [GENERAL] Rebranding PostgreSQL

2005-11-16 Thread Bruno Wolff III
On Wed, Nov 16, 2005 at 14:19:28 -0500, Vivek Khera [EMAIL PROTECTED] wrote: if they're poking around the process table, just change the name of the postmaster executable and the socket it creates to johnsdb or some such. I think you need to be careful with that. The last time I

Re: [GENERAL] Outer join with where conditions

2005-11-14 Thread Bruno Wolff III
On Mon, Nov 14, 2005 at 14:45:22 +0100, Michał Otroszczenko [EMAIL PROTECTED] wrote: Hello, I wonder If I could move additional join condition from ON part of query to where part. Yes, but the semantics are different for outer joins. For example instead of: SELECT * FROM

Re: [GENERAL] IF EXISTS

2005-11-14 Thread Bruno Wolff III
On Mon, Nov 14, 2005 at 13:20:59 -0800, P.M [EMAIL PROTECTED] wrote: Hi, I would like to know if IF EXISTS exists under postgresql ? because i did not find it. before to create users or database, i would like to be sure that they do not exist already. so how can i test it and do

Re: [GENERAL] A good postgresql book

2005-11-11 Thread Bruno Wolff III
On Fri, Nov 11, 2005 at 11:58:22 -0500, Dennis Veatch [EMAIL PROTECTED] wrote: Yeah I saw that list there but 2 quarters couldn't buy me a clue as to which was most suitable for me. Your other option is to read two books. One about Postgres and one about relational databases. The online

Re: [GENERAL] ident client authentication

2005-11-08 Thread Bruno Wolff III
On Tue, Nov 08, 2005 at 10:02:14 +, Paul Hide [EMAIL PROTECTED] wrote: I have a problem with ident client authentication. My server is debian sarge, pg version is 7.4.7, apache 2.0.54, mod_python 2.3. A python script is placed on the server and runs under mod_python in apache. I make

Re: [GENERAL] ident client authentication

2005-11-08 Thread Bruno Wolff III
On Tue, Nov 08, 2005 at 17:18:32 +, Paul Hide [EMAIL PROTECTED] wrote: Many thanks for your reply. The web server runs as what/whoever it does by default. I haven't changed it. I understand what you are getting at, because Richard Huxton pointed out to me that the script is probably

Re: [GENERAL] Beyond the 1600 columns limit on windows

2005-11-08 Thread Bruno Wolff III
Well this screams random arbitrary limit to me. Why does this limit exist? What ever happened to the holy 0,1,infinity triumvirate? I guess it eases implementation and there is no reason to go so high on columns either. The limit could even be lower w/o and hurts but 1600 seems

Re: [GENERAL] Can I use variable to store sql data?

2005-10-29 Thread Bruno Wolff III
Please post questions to relevant lists. This question did not belong on the patches list. I have moved the discussion to the general list. Please don't reply to other threads to start new ones. This messes up the archives and won't help people see your question. On Mon, Oct 17, 2005 at 09:55:50

Re: [GENERAL] function that resolves IP addresses

2005-10-29 Thread Bruno Wolff III
On Wed, Oct 19, 2005 at 14:36:46 +0200, Marcel Gsteiger [EMAIL PROTECTED] wrote: Hi all Does anybody know how I could create a database function that accepts an INET parameter and reverse-lookups the hostname via DNS PTR lookup? Something like the dnsname command line utility in the djbdns

Re: [GENERAL] dynamic table naming in function

2005-10-29 Thread Bruno Wolff III
On Sat, Oct 29, 2005 at 10:45:21 -0700, Matthew Peter [EMAIL PROTECTED] wrote: Out of curiosity, I was wondering if it is possible to use dynamic table names in a function? AND whether or not you can test a value prior to insert to see whether or not you want to update that column. Where

Re: [GENERAL] difficulty formating interval datatypes in 7.4

2005-10-29 Thread Bruno Wolff III
On Wed, Oct 19, 2005 at 16:22:29 -0400, Chris Matheson [EMAIL PROTECTED] wrote: Hello list, I am working to format an interval in using the to_char() SQL function on postgresql 7.4.8. I've had nothing but disapointment so far. My confusion occurs when I'm trying to format using days

Re: [GENERAL] SHA1 authentication

2005-10-27 Thread Bruno Wolff III
On Mon, Oct 24, 2005 at 11:33:50 +0200, Martijn van Oosterhout kleptog@svana.org wrote: By all means, submit a patch but there's no real hurry right now. We should probably move straight to something more secure anyway, maybe SHA-256 or something. This makes more sense. There is little

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1 -- SOLVED

2005-10-26 Thread Bruno Wolff III
On Mon, Oct 24, 2005 at 16:21:57 -0700, [EMAIL PROTECTED] wrote: On Mon, Oct 24, 2005 at 07:14:43PM -0400, Alex Turner wrote: I believe based on semi-recent posts that MIN and MAX are now treated as special cases in 8.1, and are synonymous with select id order by id desc limit 1 etc..

Re: [GENERAL] improve 'where not exists' query..

2005-10-26 Thread Bruno Wolff III
On Tue, Oct 25, 2005 at 15:46:52 -0500, Noel Whelan [EMAIL PROTECTED] wrote: I'm wondering if there's an ideal way to improve the efficiency of this query: SELECT i.id http://i.id FROM items i WHERE (NOT (EXISTS (SELECT c.id http://c.id FROM contacts c WHERE (c.id http://c.id = i.id

Re: [GENERAL] How to get the value in the lastvalue field

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 26, 2005 at 18:12:32 +0530, Venki [EMAIL PROTECTED] wrote: Hi thanks for the replies. The situation is as follows. We get backups from the production server and update the local database in the local server but each time when we restore the database backup the sequence values

Re: [GENERAL] Where is the webaddress for the most recent postgresql version?

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 26, 2005 at 10:33:21 -0400, Emi Lu [EMAIL PROTECTED] wrote: Good morning, May I know the link/web address where I can get the most recent postgresql version information please? I'd love also to get the online manual address about updating old version to the new one and the

Re: [GENERAL] count( only if true)

2005-10-26 Thread Bruno Wolff III
On Wed, Oct 12, 2005 at 22:24:48 +0200, peter pilsl [EMAIL PROTECTED] wrote: knowledge=# select x,count(case when id5 then 't' else null end) from test2 group by x; x | count ---+--- e | 1 - thats the result I want !!! b | 1 c | 1 d | 0 a |

Re: [GENERAL] [pgsql-advocacy] Oracle buys Innobase

2005-10-23 Thread Bruno Wolff III
On Wed, Oct 19, 2005 at 10:07:05 -0500, [EMAIL PROTECTED] wrote: Yep. It is not just limited to empty strings; An all blank string, no matter the number of characters, is stored as NULL. And a corollary to that idiocy is that a string with two blank characters is not equal to a string

Re: [GENERAL] Questions about Rollback - after insert, update, delete ... operations?

2005-09-23 Thread Bruno Wolff III
? I actually have the message saved for reference, so it is easier attach it rather than try to figure out how to link to it in the archives. ---BeginMessage--- Bruno Wolff III [EMAIL PROTECTED] writes: I wasn't able to find where this is spelled out in the documentation, but I believe all DDL

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-23 Thread Bruno Wolff III
On Fri, Sep 23, 2005 at 13:19:34 +0200, Yonatan Ben-Nes [EMAIL PROTECTED] wrote: You can add to that list the command TRUNCATE though it can be rollback its not useful in cases where the truncated data should continue to be accessed till the transaction be commited. I think that is a

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Bruno Wolff III
On Fri, Sep 23, 2005 at 12:51:09 +0200, Yonatan Ben-Nes [EMAIL PROTECTED] wrote: Hi all, Every few days I need to DELETE all of the content of few tables and INSERT new data in them. The amount of new data is about 5 million rows and each row get about 3 queries (INSERT + UPDATE). Now

Re: [GENERAL] array_dims array_lower/upper distance

2005-09-22 Thread Bruno Wolff III
On Thu, Sep 22, 2005 at 14:16:48 -0600, Guy Fraser [EMAIL PROTECTED] wrote: On Thu, 2005-22-09 at 12:43 -0400, Greg Stark wrote: Guy Fraser [EMAIL PROTECTED] writes: So to answer his question he would likely want : SELECT array_upper(item,1) - array_upper(item,0) + 1 as

Re: [GENERAL] Partial dates

2005-09-16 Thread Bruno Wolff III
On Wed, Sep 14, 2005 at 00:09:58 -0400, Joe [EMAIL PROTECTED] wrote: I'm not sure I agree with the need to fix or sanitize the data. The columns in question are used mostly for publication dates. While you may be able to find a full release date for recent books, they are generally

Re: [GENERAL] Postgresql Hosting

2005-09-10 Thread Bruno Wolff III
On Fri, Sep 09, 2005 at 16:21:42 -0700, Ron Mayer [EMAIL PROTECTED] wrote: Various people wrote: ...PostgreSQL...crontab support...pl/pgsql I've found that with if you can get 5 companies/users to share a dedicated server you can be much better off than a hosting plan, and have full

Re: [GENERAL] SQL - planet redundant data

2005-09-08 Thread Bruno Wolff III
On Thu, Sep 08, 2005 at 19:58:55 -0800, Poul Jensen [EMAIL PROTECTED] wrote: This novice must be missing a sneaky way to avoid massive redundancy and still maintain easy access. I've been suggested to look at inheritance and foreign keys. Foreign keys I don't see how to use, but I could

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Bruno Wolff III
On Wed, Sep 07, 2005 at 12:21:45 -0700, Steve Atkins [EMAIL PROTECTED] wrote: /[EMAIL PROTECTED]@(?:[EMAIL

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Bruno Wolff III
On Mon, Sep 05, 2005 at 12:20:24 +0300, Peter Nixon [EMAIL PROTECTED] wrote: Hi List Does anyone have any comments, HOWTOs and experience running multiple Postgres servers with a shared disk (SAN) in a Hot standby configuration? Can someone please point me in the direction of any docs on

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Bruno Wolff III
On Tue, Sep 06, 2005 at 13:47:42 -0500, Jim C. Nasby [EMAIL PROTECTED] wrote: On Tue, Sep 06, 2005 at 10:13:33AM -0500, Bruno Wolff III wrote: On Mon, Sep 05, 2005 at 12:20:24 +0300, Peter Nixon [EMAIL PROTECTED] wrote: Hi List Does anyone have any comments, HOWTOs

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Bruno Wolff III
On Tue, Sep 06, 2005 at 17:01:41 -0500, Jim C. Nasby [EMAIL PROTECTED] wrote: Maybe it would be better to keep this in PGDATA (or even a duplicate copy). Holding a write lock on the file should also help ensure that you can tell if it's stale or not. And the end user can do that if they

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Bruno Wolff III
On Wed, Sep 07, 2005 at 00:19:19 -0400, Tom Lane [EMAIL PROTECTED] wrote: Well, if you know any vendors who move postmaster.pid out of the PGDATA directory, let us know so we can knock some sense into their heads. postmaster.pid is specifically a lock on the directory, and moving it

Re: [GENERAL] optimum settings for dedicated box

2005-08-31 Thread Bruno Wolff III
On Wed, Aug 31, 2005 at 00:50:20 -0700, Matthew Peter [EMAIL PROTECTED] wrote: Is 8.1 to early to use in a production environment? With just the regular old 8.0.3 stuff? 8.1 is still in early beta and you definitely don't want to use it in production. It has some nice improvements, so you

Re: [GENERAL] Removing all users from a group

2005-08-31 Thread Bruno Wolff III
On Wed, Aug 31, 2005 at 12:30:14 +0200, David Sankel [EMAIL PROTECTED] wrote: DELETE FROM pg_user WHERE usesysid = ANY ( SELECT grolist FROM pg_group WHERE groname = 'somegroupname' ) But, alas, it doesn't. Neither does any combination of IN and ANY. It seems to me like this should

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Tue, Aug 30, 2005 at 11:25:26 +0200, Ben-Nes Yonatan [EMAIL PROTECTED] wrote: If btree index is not suitable for this query then which index is? as far as I understand the rtree index doesnt support range checks and the hash index is not recommended by almost everyone (including the

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Wed, Aug 31, 2005 at 01:27:30 +0200, Ben-Nes Yonatan [EMAIL PROTECTED] wrote: Now again im probably just paranoid but when I'm starting a transaction and in it im making more then 4 billions diffrent queries (select,insert,update,truncate...) and then im closing it, its counted as

Re: [GENERAL] postgresql performance degradation over time....

2005-08-27 Thread Bruno Wolff III
On Sat, Aug 27, 2005 at 18:19:54 +0530, sunil arora [EMAIL PROTECTED] wrote: Bruno, thanks for the reply, we did run vaccum on it.. and we do it regulary to maintain its performance but its not giving the expected results. Did you do VACUUM FULL or just plain VACUUM? I dont know but if we

Re: [GENERAL] ?^???G Re: A strange problem

2005-08-27 Thread Bruno Wolff III
On Sun, Aug 28, 2005 at 08:46:56 +0800, Tang Tim Hei [EMAIL PROTECTED] wrote: In the above command, I just add another table reference to it and it gives me two different results. Even I add columns like B.* to it, it do the same things too. Is it not consistance? In real world, I

Re: [GENERAL] help

2005-08-26 Thread Bruno Wolff III
On Fri, Aug 26, 2005 at 01:41:12 -0700, All I need is integer columns evaluting in a nullif('1','') returns int = 1 nullif('','') returns int = null nullif('0','') returns int = 0 fashion upon inserting to an INTEGER column. Forget booleans. Forget text. Just integers. Is this

Re: [GENERAL] postgresql performance degradation over time....

2005-08-26 Thread Bruno Wolff III
On Fri, Aug 26, 2005 at 22:13:04 +0530, sunil arora [EMAIL PROTECTED] wrote: Hi folks, this is my first post to this emailing list. We are using postgres-7.4 in a Server based application which requires frequent updates and inserts of the database. We have observed a substantial fall in

Re: [GENERAL] Help with a subselect inside a view

2005-08-25 Thread Bruno Wolff III
On Wed, Aug 24, 2005 at 23:12:17 -0700, Bill Moseley [EMAIL PROTECTED] wrote: I need a little SQL help: I'm trying to get a subselect working inside a view. Unfortunately you didn't show us what you tried. My guess would be that you didn't enclose the subselect in parenthesis. The distinct

Re: [GENERAL] Help with a subselect inside a view

2005-08-25 Thread Bruno Wolff III
On Thu, Aug 25, 2005 at 08:19:25 -0700, Bill Moseley [EMAIL PROTECTED] wrote: DROP VIEW cl; CREATE VIEW cl (id, instructor) AS SELECT class.id, person.first_name FROM class, instructors, person WHERE instructors.person = person.id AND class.id

Re: [GENERAL] Where to get 8.1 beta test version?

2005-08-23 Thread Bruno Wolff III
On Tue, Aug 23, 2005 at 10:36:34 -0500, Kevin Grittner [EMAIL PROTECTED] wrote: - Any idea when it will get to beta test status? Based on the discussions I have seen, the first beta will probably be released within a week. - Is it currently stable enough to make a real-world test

Re: [GENERAL] Stored functions

2005-08-19 Thread Bruno Wolff III
On Fri, Aug 19, 2005 at 15:15:44 +0100, Nigel Horne [EMAIL PROTECTED] wrote: Thanks for all the pointers. I'll have a look. I did reply earlier, but the reply to is broken: it sent to the OP rather than the list... No it isn't broken. You should use the reply to all function of your mail

Re: [GENERAL] Generating random values.

2005-08-18 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 15:54:40 -0600, Edmund [EMAIL PROTECTED] wrote: Great! a simple, dumb program can generate all your passwords in very quickly. My 2.4 Ghz Pentium 4 did it in under 10 minutes. A token set of 16 characters, and a fixed length of 8 charachters just isnt a very big

Re: [GENERAL] Startup ...

2005-08-18 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 18:36:55 -0700, Gary Fay [EMAIL PROTECTED] wrote: I have a fedora core 3 system. I was able to start the postgres server with the tool but I have no idea how to create the databases. I am getting errors about my user id and I should connect with the one that started

Re: [GENERAL] BUG #1830: Non-super-user must be able to copy from a file

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 09:22:16 +0100, Bernard [EMAIL PROTECTED] wrote: The following bug has been logged online: This isn't a bug and you really should have asked this question on another list. I am moving the discussion over to the general list. Bug reference: 1830 Logged by:

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 17:35:37 +0200, Csaba Nagy [EMAIL PROTECTED] wrote: The only problem is that you can't use the order by/limit syntax inside the union queries I guess, cause the query you proposed is giving a syntax error. I also thought first to do it like this, but it won't work. If

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 11:57:52 -0700, Ron Mayer [EMAIL PROTECTED] wrote: Richard Huxton wrote: While the other answers all do their job, and in one go too, I'd be surprised if you found anything faster than: SELECT myval FROM mytable WHERE myval 1234 ORDER BY myval LIMIT 1

Re: [GENERAL] Field order

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 12:09:12 -0600, Michael Schmidt [EMAIL PROTECTED] wrote: I've searched the archives and found this question was asked in 2001 but never answered. Does the order of fields in a table make a difference? In Paradox (from whence I come), there was some belief that

Re: [GENERAL] Field order

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 17:40:34 -0500, Jim C. Nasby [EMAIL PROTECTED] wrote: Ugh, and here I'd been doing it the other way around. I assume variable-length stuff should always go last, right? I think it depends on the alignment of the type. Certain text, char and varchar should go at the

Re: [GENERAL] Select for update

2005-07-29 Thread Bruno Wolff III
On Fri, Jul 29, 2005 at 00:05:46 +0200, Havasvölgyi Ottó [EMAIL PROTECTED] wrote: This function deletes a row, and updates the pid field where pid is geater than the deleted pid value, so that the gap caused by the deletion is not present any more. This isn't directly related to your

Re: [GENERAL] GUID for postgreSQL

2005-07-29 Thread Bruno Wolff III
On Fri, Jul 29, 2005 at 12:18:30 -0400, John D. Burger [EMAIL PROTECTED] wrote: If you use a large enough space for the number you can reduce that probability of an accidental collision to much less than that of catastrophic hardware failure at which point it isn't noticably better than

Re: [GENERAL] Looking for version 7.4.7 for windows

2005-07-29 Thread Bruno Wolff III
On Fri, Jul 29, 2005 at 20:23:54 -, Rod MacNeil [EMAIL PROTECTED] wrote: Does anyone know where I can get a windows version of 7.4.7? 7.4.7 doesn't run under windows natively. You can get it to run using cygwin. Perhaps if you told us more about what you are trying to do, we could make

Re: [GENERAL] GUID for postgreSQL

2005-07-28 Thread Bruno Wolff III
On Wed, Jul 27, 2005 at 16:57:21 -0400, John DeSoi [EMAIL PROTECTED] wrote: On Jul 27, 2005, at 4:46 PM, Scott Marlowe wrote: So, how can two databases, not currently talking to one another, guarantee that their GUIDs don't collide? using a large randomly generated name space only

Re: [GENERAL] duplicate messages?

2005-07-27 Thread Bruno Wolff III
On Wed, Jul 27, 2005 at 11:46:05 -0400, Robert Treat [EMAIL PROTECTED] wrote: Seems unlikely unless folks like Tom Lane, Stephan Szabo, and Richard Huxton have unsubscribed and resubscribed lately... Funny thing is it isnt every messages, but maybe half of them. And its not to specific

Re: [GENERAL] DELETE with JOIN syntax

2005-07-27 Thread Bruno Wolff III
On Wed, Jul 27, 2005 at 15:28:36 -0400, Brian Wong [EMAIL PROTECTED] wrote: I am currently migrating from MySQL to PostgreSQL and I have found that some queries do not work. For instance, DELETE t1 FROM t1 LEFT JOIN t2 USING (column_id) WHERE t2.column_id IS NULL; works in MySQL. This

Re: [GENERAL] Wishlist?

2005-07-21 Thread Bruno Wolff III
On Thu, Jul 21, 2005 at 19:10:03 +1000, Ezequiel Tolnay [EMAIL PROTECTED] wrote: * Stored procedures: Although similar to functions, SP always return an execution status rather than a result, but provide the caller with the equivalent of running several sql instructions, as if running a

Re: [GENERAL] Custom DateStyle

2005-07-20 Thread Bruno Wolff III
On Tue, Jul 19, 2005 at 11:51:55 -0400, Amir Tahvildaran [EMAIL PROTECTED] wrote: Is it possible to add a custom datestyle? I am migrating from sybase to postgres and the datetime/timestamp formats are different, some of the existing code depends on that format. I thought the easiest

Re: [GENERAL] on delete rules on a view problem

2005-07-20 Thread Bruno Wolff III
On Wed, Jul 20, 2005 at 16:49:26 +0200, Rose, Juergen [EMAIL PROTECTED] wrote: Hi all, I'am a bit puzzled. I have a view and some delete rules defined on it. Now my problem is, only one gets executed (the first one) and the other ones seem not to be executed at all. I use a subselect

Re: [GENERAL] index row size exceeds btree maximum, 2713 - Solutions?

2005-07-18 Thread Bruno Wolff III
On Mon, Jul 18, 2005 at 14:44:26 -0500, Dan Armbrust [EMAIL PROTECTED] wrote: I'm trying to load some data into PostgreSQL 8.0.3, and I got the error message index row size 2904 exceeds btree maximum, 2713. After a bunch of searching, I believe that I am getting this error because a

Re: [GENERAL] re my previous e-mail client-server example

2005-07-15 Thread Bruno Wolff III
On Wed, Jul 13, 2005 at 17:56:44 +0100, John Tulodziecki [EMAIL PROTECTED] wrote: Bizzarly its now working after I added the server ip address in addition to the client ip address in the listen addresses config line !!! That isn't bizzare. The listen address is what address the server should

Re: [GENERAL] Nulls in timestamps

2005-07-15 Thread Bruno Wolff III
On Wed, Jul 13, 2005 at 18:15:12 +, [EMAIL PROTECTED] wrote: Many thanks Tom. Inconvenient from the point of view of the application but still useful information. The situation is that I've got a query with numerous subselects, each of which has to return exactly one row so I was doing

Re: [GENERAL] How to create unique constraint on NULL columns

2005-07-15 Thread Bruno Wolff III
On Fri, Jul 15, 2005 at 20:08:32 +0300, Andrus [EMAIL PROTECTED] wrote: So I'll think still continuing to use null as unrestricted department access. Is it reasonable to create unique constraint using CREATE UNIQUE INDEX user_id_permission_id_department_id_unique_idx ON permission

Re: [GENERAL] Update more than one table

2005-07-12 Thread Bruno Wolff III
On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: Hi Roman. Many thanks for your reply. This is interesting and will I give this a try and let you know how it works out. With this you are right, application logic and transaction don't have to be separate which

Re: [GENERAL] Update more than one table

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 17:35:35 +0200, Roman Neuhauser [EMAIL PROTECTED] wrote: # [EMAIL PROTECTED] / 2005-07-12 10:08:37 -0500: On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: Hi Roman. Many thanks for your reply. This is interesting and will I give

Re: [GENERAL] illegal sort order

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 20:45:37 +0300, Andrus [EMAIL PROTECTED] wrote: How to force the correct sort order or at least move accented characters ÕÄÖÜ to end of sorted list ? Sort order depends on the locale used in initdb. If you want data sorted by the codes used to represent the data,

Re: [GENERAL] illegal sort order

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 22:09:40 +0300, Andrus [EMAIL PROTECTED] wrote: Sort order depends on the locale used in initdb. If you want data sorted by the codes used to represent the data, then you might want to initdb with a locale of C. Doing an initdb will require a dump and reload.

Re: [GENERAL] Why UPDATE gl SET gl.glnum = gl.glnum; cause error when UPDATE gl SET glnum = glnum; is OK ?

2005-07-08 Thread Bruno Wolff III
On Fri, Jul 08, 2005 at 09:59:03 -0400, David Gagnon [EMAIL PROTECTED] wrote: Hi all, I was juste wondering why the following code don't work: Because the value being set is a column name from the table being updated and you aren't allowed to qualify it with a table name. You don't really

Re: [GENERAL] Hot to restrict access to subset of data

2005-07-01 Thread Bruno Wolff III
On Fri, Jul 01, 2005 at 08:46:04 -0600, Michael Fuhr [EMAIL PROTECTED] wrote: On Fri, Jul 01, 2005 at 01:56:41PM +0300, Andrus wrote: 2. Postgres should allow access from my application only. Is it possible to use authentication method which allows access from my application only ?

Re: [GENERAL] performance for insert / update

2005-06-28 Thread Bruno Wolff III
On Mon, Jun 27, 2005 at 18:46:58 +0300, Catalin Constantin [EMAIL PROTECTED] wrote: Hello, I have a pretty big database with about 200 000 rows. This is the main table. Also some other tables with FKs to this main table. I have to calculate some numbers for each entry at a certain

Re: [GENERAL] Infix Function?

2005-06-27 Thread Bruno Wolff III
On Sun, Jun 26, 2005 at 15:42:25 -0500, Peter Fein [EMAIL PROTECTED] wrote: Is there anyway to create an infix version of this? I'd really like be able to write (where a..d are some boolean conditions): Use : area= select true false true; ?column? -- f (1 row) area= select

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Bruno Wolff III
On Sun, Jun 26, 2005 at 16:40:03 -0700, CSN [EMAIL PROTECTED] wrote: If I have a table of items with latitude and longitude coordinates, is it possible to find all other items that are within, say, 50 miles of an item, using the geometric functions

Re: [GENERAL] Scripting issues

2005-06-21 Thread Bruno Wolff III
On Tue, Jun 21, 2005 at 09:16:08 +0200, [EMAIL PROTECTED] wrote: I come from a MSSQL background and am trying to figure out how to write deployment scripts for PostgreSQL. Typically, if I want to drop a function, I would write a script that first checks for it's existence and then performs

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-20 Thread Bruno Wolff III
On Sun, Jun 19, 2005 at 17:16:34 +0100, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote: There would be no problem in doing so with such an easy case, but think about having a table with cities (hundred, thousands?) and then have four copies for each of the above posibilities with its related

Re: [GENERAL] Replication

2005-06-18 Thread Bruno Wolff III
On Fri, Jun 17, 2005 at 22:54:59 -0700, Jeffery Reedy [EMAIL PROTECTED] wrote: I have been searching for the ability for replication between postgresql database servers. Many of the solutions That I have seen either work only un*x or requires an expensive commercial license. I am looking

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-17 Thread Bruno Wolff III
On Fri, Jun 17, 2005 at 14:35:01 +0200, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote: The problem comes when you have questions that may be not applicable (8), or optional (doesn't know, doesn't answer) (9). The easy solution would be to have four tables: yes_no yes_no_not_applicable

Re: [GENERAL] Deleting a rule?

2005-06-17 Thread Bruno Wolff III
On Fri, Jun 17, 2005 at 15:27:30 -0700, Benjamin Smith [EMAIL PROTECTED] wrote: I wrote a rule a while back that, due to the software being extended, now needs to be deleted. How do I drop a rule? DELETE FROM pg_rules WHERE rulename='foo'; doesn't seem to cut it... DROP

Re: [GENERAL] How to set an expiration date for a WHOLE user account

2005-06-15 Thread Bruno Wolff III
On Wed, Jun 15, 2005 at 13:34:39 +0200, Zlatko Mati? [EMAIL PROTECTED] wrote: Hi. Concerning Együd's question, I also wanted to ask about setting expiration date for database. But, I would like to set validity in sense of certain actions. For example, I would like to prevent adding new

Re: [GENERAL] Hash Function: MD5 or other?

2005-06-14 Thread Bruno Wolff III
On Tue, Jun 14, 2005 at 08:33:34 -0500, Peter Fein [EMAIL PROTECTED] wrote: Knowing the specifics of the data I'm putting in sometext, a halfway decent hash function would make collisions so rare as to make the chance insignificant (and collisions wouldn't break anything anyway). Is this

Re: [GENERAL] Hash Function: MD5 or other?

2005-06-14 Thread Bruno Wolff III
On Tue, Jun 14, 2005 at 15:54:50 -0500, Peter Fein [EMAIL PROTECTED] wrote: I'm unclear why I'd need to store the hash in a column. I suppose I could have the hash column populated by a trigger on inserts, but this seems to get me the same functionality is less obvious. For the

Re: [GENERAL] PG 8.0.1 is getting slow in 24 hours. Only daily VACUUM FULL helps

2005-06-13 Thread Bruno Wolff III
On Mon, Jun 13, 2005 at 22:27:31 +0200, Együd Csaba [EMAIL PROTECTED] wrote: The critical tables are vacuum analyzed in every hour. (Not vacuum full because of the several minutes long exclusive lock) Earlier the system had been running for 3 months without problems, but a few weeks ago

Re: [GENERAL] Index problem

2005-06-13 Thread Bruno Wolff III
On Tue, Jun 14, 2005 at 08:37:38 +1200, David Mitchell [EMAIL PROTECTED] wrote: I'm totally baffled as to why postgres won't use this index. I have a table point with an index on it as so: CREATE INDEX unit_point ON point USING btree (unit_id, time); When I try the following

Re: [GENERAL] Postgres 8.1

2005-06-12 Thread Bruno Wolff III
On Sun, Jun 12, 2005 at 23:03:35 +0100, Simon Windsor [EMAIL PROTECTED] wrote: Has a roadmap and timescale been released for Postgres 8.1? Feature freeze will be July 1. Expect a beta about 1 month after that (based on past experience). The date of the release is highly variable, but will

Re: [GENERAL] Inherits and get highest id.

2005-06-10 Thread Bruno Wolff III
On Fri, Jun 10, 2005 at 12:27:32 +0200, Dawid Kuroczko [EMAIL PROTECTED] wrote: In other words -- doing such a one row select means scanning the whole partitioned data. the primaryindex on logid is not used anywhere. Creating view (SELECT * UNION ALL SELECT * UNION ALL) does not help

Re: [GENERAL] Possible to ignore transactions n?

2005-06-08 Thread Bruno Wolff III
On Tue, Jun 07, 2005 at 10:25:26 -0700, John Barham [EMAIL PROTECTED] wrote: Is is possible to tell PostgreSQL to ignore transactions committed after some point? In particular I want to get it to rollback a faulty recovery. PITR will let you do this. You need to have a complete backup of

<    1   2   3   4   5   6   7   >