Re: [GENERAL] last tuple affected

2005-01-27 Thread Bruno Wolff III
On Thu, Jan 27, 2005 at 12:45:13 +0100, Miguel Angel Tribaldos Hervas <[EMAIL PROTECTED]> wrote: > > I only need to know if a table has changed since the last check > (create, update...), but I want to avoid a trigger + artificial records table. > Is this information recorded somewhere, in a sys

Re: [GENERAL] Return value of 'serial' column on insert

2005-01-26 Thread Bruno Wolff III
On Thu, Jan 27, 2005 at 00:35:25 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > Hi all, > > I have several tables with an 'id' column which is a simple 'serial > unique' type. Often when I insert a record the next thing I need is to > add or edit another table elsewhere using the ID of th

Re: [GENERAL] self-join on subselect

2005-01-26 Thread Bruno Wolff III
On Wed, Jan 26, 2005 at 23:12:25 +0100, PFC <[EMAIL PROTECTED]> wrote: > > How do you do a self-join on a subselect ? > > like > SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10 > > but without performing the subselect twice >

Re: [GENERAL] serialization errors when inserting new records

2005-01-23 Thread Bruno Wolff III
On Sun, Jan 23, 2005 at 10:23:50 +0100, Ralph van Etten <[EMAIL PROTECTED]> wrote: > But I think there are situations where a serial isn't convenient > Like when you want an primary key which consists of the current > year and an sequence number. Like ('05', 1), ('05', 2), ('05', 3) etc. > With a

Re: [GENERAL] Multiline plpython procedure

2005-01-21 Thread Bruno Wolff III
On Fri, Jan 21, 2005 at 12:02:09 +0100, Marco Colombo <[EMAIL PROTECTED]> wrote: > On Fri, 21 Jan 2005, Greg Stark wrote: > > Anyway, think of floats. If you want do to FP maths fast, you need to use > the native format supported by the CPU. When you dump, you get a text > form of the FP number,

Re: [GENERAL] what happened to the website?

2005-01-19 Thread Bruno Wolff III
On Wed, Jan 19, 2005 at 11:06:56 -0500, [EMAIL PROTECTED] wrote: > What does that mean? http://en.wikipedia.org/wiki/Slashdot_effect ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] serial increments on failed insert

2005-01-15 Thread Bruno Wolff III
On Fri, Jan 14, 2005 at 17:49:42 -0800, Steve Atkins <[EMAIL PROTECTED]> wrote: > > That's correct, documented behaviour. A serial column is mostly just a > sequence in disguise. A sequence is guaranteed to give unique, > increasing values, but in many cases may miss a value (for several > reaso

Re: [GENERAL] to_char(interval, text) deprecated in future - how do we get consistent interval output without it?

2005-01-15 Thread Bruno Wolff III
On Fri, Jan 14, 2005 at 11:36:26 -0800, [EMAIL PROTECTED] wrote: > I saw the note in the docs that to_char(interval, text) is deprecated, and > will be removed. I searched the archives and saw more mentions of this, > but no real explanation as to how it is planned for us to get consistent > out

Re: [GENERAL] Problem Dropping a Database with users connected to it

2005-01-14 Thread Bruno Wolff III
On Fri, Jan 14, 2005 at 11:16:16 -0500, Eric Dorland <[EMAIL PROTECTED]> wrote: > > * Disconnecting all other users before dropping the db, but that doesn't > seem possible (I could start and stop the db, but that doesn't stop any > clients from just reconnecting right away). You could use an a

Re: [GENERAL] Adding UNIQUE constraint on NULL column

2005-01-13 Thread Bruno Wolff III
On Thu, Jan 13, 2005 at 09:01:08 -0500, Dave Smith <[EMAIL PROTECTED]> wrote: > I am trying to add a unique constraint on a column that can be null. The > documentation states that null is treated as non equal values but I want > them to be equal. Is there another way of doing this other than wri

Re: [GENERAL] problems with 8.0 Rc4

2005-01-11 Thread Bruno Wolff III
On Tue, Jan 11, 2005 at 15:40:07 +, Peter Childs <[EMAIL PROTECTED]> wrote: > > I thought pg_autovaccum was going to be built into 8.0 or was that > only a rumor. Due to some unfortunate things it was not ready by the beta cutoff, so it is staying in contrib for the 8.0 release.

Re: [GENERAL] Private or publice function

2005-01-11 Thread Bruno Wolff III
On Tue, Jan 11, 2005 at 18:36:17 +, Richard Huxton wrote: > Nirmalya Lahiri wrote: > >Thanks Richard, > > for your reply. Now I am explaining you what I want. > >Let I have 4 > >functions..function_1(),function_2(),function_3(),function_4(). > [snip] > > Now after creating these function

Re: [GENERAL] Limiting USAGE to only certain objects within a schema

2005-01-11 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 14:40:46 -0800, Chris <[EMAIL PROTECTED]> wrote: > Basically what I want is to limit a user to not being able to view > certain tables within a schema, in this case the public schema. Say > we have 300 tables in a database but a particular user only needs > access to 3 o

Re: [GENERAL] SELECT from multiple tables (not join though)

2005-01-10 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 13:24:50 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > > ^.^; Can you point me to docs that will help me learn how to do that? > Thanks! Or rather, do you mean add a column to the table with an ID for > the table that I select beside the file_name? If so, that is wh

Re: [GENERAL] SELECT from multiple tables (not join though)

2005-01-10 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 12:47:53 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > > The trick now is I need to know which table each result came from. I can > add another column and record the table number and SELECT that at the > same time but before I do I was wondering if I can do this mor

Re: [GENERAL] does "select count(*) from mytable" always do a seq

2005-01-10 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 11:51:51 -0500, Alex Turner <[EMAIL PROTECTED]> wrote: > I'm no database writing guru, but wouldn't it just be a matter of > adding a transaction number to an index entry so as to determine it's > newness and only retrieve entries with an older transaction number? No, bec

Re: [GENERAL] does "select count(*) from mytable" always do a seq

2005-01-10 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 10:26:46 -0500, Alex Turner <[EMAIL PROTECTED]> wrote: > Forgive my ignorance, but I'm still learning about much of this stuff. > If you perform: > > select an_id, int_value from my_table where int_value>400; > > The table has an index on int_value and there are enough

Re: [GENERAL] general list

2005-01-08 Thread Bruno Wolff III
On Sat, Jan 08, 2005 at 18:45:17 -0800, Jeff Davis <[EMAIL PROTECTED]> wrote: > Is there a maximum size for posting to this list? I tried posting a > somewhat involved question about PITR with the errors I got appended to > the email, and it never arrived on the list. Yes. What people are usual

Re: [GENERAL] does "select count(*) from mytable" always do a seq

2005-01-07 Thread Bruno Wolff III
On Fri, Jan 07, 2005 at 16:17:16 +0100, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Am Freitag, den 07.01.2005, 06:45 -0800 schrieb Culley Harrelson: > > Hi, > > > > I am using Postgresql 7.4. I have a table with 1.5 million rows. It > > has a primary key. VACUUM FULL ANALYZE is run every nig

Re: [GENERAL] warning: pg_query(): Query failed

2005-01-06 Thread Bruno Wolff III
On Thu, Jan 06, 2005 at 17:32:30 -0800, Aaron Steele <[EMAIL PROTECTED]> wrote: > hi bruno, > > turns out that l.last_comment_uid and l.last_comment_name are integer > and char var respectively. since i'm using 7.4.1 with strict boolean > casting, is there a better alternative to instantiating

Re: [GENERAL] warning: pg_query(): Query failed

2005-01-06 Thread Bruno Wolff III
On Thu, Jan 06, 2005 at 14:38:53 -0800, Aaron Steele <[EMAIL PROTECTED]> wrote: > hi bruno, Please copy replies to the list so that other people can help and learn from your problem. > > here's the IF() from psql, although i'm not familiar enough to really > know what to look for. do you see

Re: [GENERAL] postgresql-contrib risks?

2005-01-06 Thread Bruno Wolff III
On Thu, Jan 06, 2005 at 15:09:54 +0100, Martijn van Oosterhout wrote: > > One question though, if you are granted filesystem access to the > server, there's no reason why you couldn't just get the pgcrypto module > in your home directory and load it into the server yourself. I think > all you n

Re: [GENERAL] warning: pg_query(): Query failed

2005-01-06 Thread Bruno Wolff III
On Wed, Jan 05, 2005 at 11:16:29 -0800, Aaron Steele <[EMAIL PROTECTED]> wrote: > > would it be useful to see the IF PLSQL function, or would you recommend > a modification to the database.pgsql.inc file? You should probably try looking at the IF function first to see if you can spot it using

Re: [GENERAL] warning: pg_query(): Query failed

2005-01-05 Thread Bruno Wolff III
On Wed, Jan 05, 2005 at 10:17:39 -0800, Aaron Steele <[EMAIL PROTECTED]> wrote: > hi, > > warning: pg_query(): Query failed: ERROR: invalid input syntax for type > boolean: "2" > CONTEXT: PL/pgSQL function "if" line 2 at if in > /Library/WebServer/Documents/dmap/includes/database.pgsql.inc on

Re: [GENERAL] multi column index and order by

2005-01-05 Thread Bruno Wolff III
On Wed, Jan 05, 2005 at 15:35:22 +0100, Mage <[EMAIL PROTECTED]> wrote: > Hello, > > "order by a asc b desc" > > how can I create an index for this? Currently you can't directly. In recent versions of Postgres you have some options: If one of the types has a normal minus operator, then

Re: [GENERAL] Question on a select

2005-01-01 Thread Bruno Wolff III
On Sun, Jan 02, 2005 at 01:58:20 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > Bruno Wolff III wrote: > >SELECT a_name, a_type, a_dir, a_ FROM table_a > > WHERE a_name, a_type, a_dir NOT IN ( > >SELECT b_name, b_type, b_dir FROM table_b) > >; > >

Re: [GENERAL] Question on a select

2005-01-01 Thread Bruno Wolff III
On Sat, Jan 01, 2005 at 22:32:17 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > Hi all, > > This is my first post here so please let me know if I miss any list > guidelines. :) > > I was hoping to get some help, advice or pointers to an answer for a > somewhat odd (to me at least) SELE

Re: [GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread Bruno Wolff III
On Fri, Dec 31, 2004 at 15:02:56 -0600, [EMAIL PROTECTED] wrote: > > I've put an '*' next to the rows I want. So my dilemma is two part. > First, I want to sort by the ordinal information only when the arc is > pointing from the source object (id 638) to the other objects. Well, it's > pretty

Re: [GENERAL] Large Objects

2004-12-30 Thread Bruno Wolff III
On Mon, Dec 27, 2004 at 10:39:48 -0600, Dan Boitnott <[EMAIL PROTECTED]> wrote: > I need to do some investigation into the way Postgres handles large > objects for a major project involving large objects. My questions are: I don't know the answer to all of your questions. >* Is it practic

Re: [GENERAL] Tracking back foreign keys?

2004-12-30 Thread Bruno Wolff III
On Sun, Dec 26, 2004 at 09:43:59 -0800, Benjamin Smith <[EMAIL PROTECTED]> wrote: > > Something like > > Select pg_table.name from pg_table where pg_field references images.id > > ? > > How else do I put it? The output I'd like would be something like > images.id / tablename / table.primary

Re: [GENERAL] possible to DELETE CASCADE?

2004-12-30 Thread Bruno Wolff III
On Thu, Dec 30, 2004 at 11:40:21 -0800, Miles Keaton <[EMAIL PROTECTED]> wrote: > On Thu, 30 Dec 2004 11:10:38 -0800, I wrote: > > Is it possible for a query to delete a record and all of its > > foreign-key dependents? > > > Sorry - to be more clear : I like having my foreign keys RESTRICT fro

Re: [GENERAL] update table with row locking

2004-12-29 Thread Bruno Wolff III
On Wed, Dec 29, 2004 at 07:02:51 -0800, Mark <[EMAIL PROTECTED]> wrote: > In general I need to lock whole table so only one session can > perform update. I'm looking for solution that will work in both C++ > and Java. You probably want to use LOCK. You can read the documention for that command

Re: [GENERAL] loading only few rows from huge table

2004-12-29 Thread Bruno Wolff III
I will mangle your reply to make it easier for other people to help with your followup question. > --- Bruno Wolff III <[EMAIL PROTECTED]> wrote: > > > On Wed, Dec 22, 2004 at 11:31:59 -0800, > > Mark <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have

Re: [GENERAL] loading only few rows from huge table

2004-12-24 Thread Bruno Wolff III
On Wed, Dec 22, 2004 at 11:31:59 -0800, Mark <[EMAIL PROTECTED]> wrote: > Hi, > I have a table with 100K rows. One of columns is a timestamp and > indicates when this row inserted. > > What will the the best way of getting 10 latest rows from that table > and introducing partial data retrieval

Re: [GENERAL] Strange Index behavior

2004-12-22 Thread Bruno Wolff III
On Wed, Dec 22, 2004 at 18:44:00 +0100, "Együd Csaba (Freemail)" <[EMAIL PROTECTED]> wrote: > But why? I thought the planner is for choose the quicker way to the target > point. If there is an index which is probably would speed up the query then > why does the planner ignore that? Because doin

Re: [GENERAL] default index created for primary key

2004-12-22 Thread Bruno Wolff III
On Wed, Dec 22, 2004 at 17:09:26 +, vinita bansal <[EMAIL PROTECTED]> wrote: > > I am actually migrating indexes from oracle database to postgres. I wanted > to turn it off so that index on the same columns is not created again > (index created for primary key of a table). I'll probably ne

Re: [GENERAL] Need help to organize database

2004-12-21 Thread Bruno Wolff III
On Tue, Dec 21, 2004 at 17:50:06 -0500, "Frank D. Engel, Jr." <[EMAIL PROTECTED]> wrote: > > Also, given the amount of data you are talking about, and assuming that > you are inserting all of this data in one big lump, you may wish to > VACUUM FULL after doing your INSERTs (not after each one,

Re: [GENERAL] Need help to organize database

2004-12-21 Thread Bruno Wolff III
On Wed, Dec 22, 2004 at 01:24:57 +, "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote: > Yes, of course, this is example only. > But relation between tables is not important now... It is important for design. You should use a normallized design initially and consider denormalized designs if y

Re: [GENERAL] Need help to organize database

2004-12-21 Thread Bruno Wolff III
On Wed, Dec 22, 2004 at 00:16:06 +, "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote: > On Tuesday 21 December 2004 21:21, Bruno Wolff III wrote: > > On Tue, Dec 21, 2004 at 20:47:31 +, > > > > "Vladimir S. Petukhov" <[EMAIL P

Re: [GENERAL] Need help to organize database

2004-12-21 Thread Bruno Wolff III
On Tue, Dec 21, 2004 at 20:47:31 +, "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote: > Ok, this is a real example: > > CREATE TABLE account ( > val1 BIGINT NULL, > val2BIGINT NULL, > ... > > dayposSMALLINTNULL, -- Day position > hourpos SMALLINTNU

Re: [GENERAL] Create a cache DB between web portal and internal DB?

2004-12-21 Thread Bruno Wolff III
On Mon, Dec 20, 2004 at 17:21:02 -, "Dearman, Rick" <[EMAIL PROTECTED]> wrote: > I have a requirement from my security manager but I can't seem to find a good > solution. So I wondered if someone had done something similar. > > We have a web portal and a DB in PostgreSQL (obviously) which c

Re: [GENERAL] Need help to organize database

2004-12-21 Thread Bruno Wolff III
On Mon, Dec 20, 2004 at 12:13:31 +, "Vladimir S. Petukhov" <[EMAIL PROTECTED]> wrote: > Hi > Sorry for my English.. > > I need to organize database structure for saving statistic data for objects. > I > have about 24 * 31 * 4 fields (4 month, 31 days, 24 hours) of data for one > object.

Re: [GENERAL] transactions in multiple action rules

2004-12-20 Thread Bruno Wolff III
On Mon, Dec 20, 2004 at 23:15:39 -0500, Ron Peterson <[EMAIL PROTECTED]> wrote: > Do the multiple actions within a multiple action rule implicitly reside > within a transaction? I notice that if I brace my multiple actions with > BEGIN; and COMMIT;, that I get a syntax error, so I'm assuming tha

Re: [GENERAL] Multi row sequence?

2004-12-19 Thread Bruno Wolff III
On Sun, Dec 19, 2004 at 15:02:27 +0200, Ciprian Popovici <[EMAIL PROTECTED]> wrote: > On Sat, 18 Dec 2004 11:07:37 -0600 Bruno Wolff III <[EMAIL PROTECTED]> wrote: > > On Fri, Dec 17, 2004 at 11:10:12 -, > > Filip Wuytack <[EMAIL PROTECTED]> wrote: > &

Re: [GENERAL] Scheduler in Postgres

2004-12-19 Thread Bruno Wolff III
On Sat, Dec 18, 2004 at 15:00:17 -0600, "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > In oracle, jobs are fired off by the database engine. If the database is > up and job support is enabled, your jobs will run. Without some kind of > support for the database to fire up connections and execute s

Re: [GENERAL] Multi row sequence?

2004-12-18 Thread Bruno Wolff III
On Sat, Dec 18, 2004 at 17:19:27 -, Filip Wuytack <[EMAIL PROTECTED]> wrote: > I'm working on a database that will contain companies (group) and the > relevant listing (securities-> id) and related periodic information. I want > the end users of the data to see the relationship between the 2

Re: [GENERAL] Multi row sequence?

2004-12-18 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 11:10:12 -, Filip Wuytack <[EMAIL PROTECTED]> wrote: > Hi, > > I just started looking into PostgreSQL (coming from Mysql before), but have > a question: > > Is it possible to have a sequence (as a multirow prim key), where sequence > (id) only increase per group of d

Re: [GENERAL] Contacting Tom Lane :)

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 23:46:46 -0500, Jerry LeVan <[EMAIL PROTECTED]> wrote: > Adelphia is not a small isp, it seems strange that > all of Adelphia would be blocked... I get crap from them. I had them mostly blocked for a while, but had to whitelist them because I need to get email from someon

Re: [GENERAL] Contacting Tom Lane :)

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 18:29:10 -0500, Jerry LeVan <[EMAIL PROTECTED]> wrote: > Hi, > > Tom answered a question from me and when I attemped to reply > I got the following stuff... > > (I am running MacOSX with a postfix (output server). Most of > the time after I get a complaint about non deli

Re: [GENERAL] replacements for vacuum?

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 18:53:42 -0800, Lonni J Friedman <[EMAIL PROTECTED]> wrote: > On Fri, 17 Dec 2004 15:28:30 -0600, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > > On Fri, Dec 17, 2004 at 12:50:42 -0800, > > Lonni J Friedman <[EMAIL PROTECTED]> wrote: >

Re: [GENERAL] replacements for vacuum?

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 12:50:42 -0800, Lonni J Friedman <[EMAIL PROTECTED]> wrote: > Greetings, > Are there any alternatives to vacuum (and, i'm aware of autovacuum)? What problem are you trying to solve? ---(end of broadcast)--- TIP 5: Have you

Re: [GENERAL] sorting problem

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 15:12:18 -0600, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Fri, Dec 17, 2004 at 15:36:58 -0500, > Greg Stark <[EMAIL PROTECTED]> wrote: > > > > Isn't that still nlog(n)? In the end you're going to have read in every page

Re: [GENERAL] sorting problem

2004-12-17 Thread Bruno Wolff III
On Fri, Dec 17, 2004 at 15:36:58 -0500, Greg Stark <[EMAIL PROTECTED]> wrote: > > Isn't that still nlog(n)? In the end you're going to have read in every page > of the index including all those non-leaf pages. Aren't there nlog(n) pages? The depth of the tree is log N, but there are only N node

Re: [GENERAL] sorting problem

2004-12-17 Thread Bruno Wolff III
On Thu, Dec 16, 2004 at 23:33:00 -0500, Greg Stark <[EMAIL PROTECTED]> wrote: > > Chris Smith <[EMAIL PROTECTED]> writes: > > > Would doing it this way require an index: > > > > create index lower_lastname on table x lower(lastname); > > Well it doesn't *require* but it may be a good idea. It

Re: [GENERAL] pl/pgsql oddity

2004-12-16 Thread Bruno Wolff III
On Thu, Dec 16, 2004 at 15:34:03 -0500, [EMAIL PROTECTED] wrote: > I prefer the FORTRAN66 construct > > IF My memory is that those labels were separated by commas. > > where it jumps to label1 if is negative, label2 if zero, and > label3 if positive. No else ifs about it. > > I hope yo

Re: [GENERAL] Scheduler in Postgres

2004-12-16 Thread Bruno Wolff III
On Thu, Dec 16, 2004 at 10:47:46 +0100, Csaba Nagy <[EMAIL PROTECTED]> wrote: > The only advantage would be that an in-database solution would be OS > independent and it could be managed using the same tools which manage > the database itself, including the backup and management of it. I'm not >

Re: [GENERAL] Performance suggestions?

2004-12-15 Thread Bruno Wolff III
On Wed, Dec 15, 2004 at 10:22:31 +1100, "Harvey, Allan AC" <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm after suggestions on how to keep the initial performance > of a system I've put together for longer than 2 minutes. > > I have a small table about 20 rows, a constant, that is receiving > abo

Re: [GENERAL] Multiple foreign keys on same field

2004-12-13 Thread Bruno Wolff III
On Tue, Dec 14, 2004 at 02:06:24 +0200, Ciprian Popovici <[EMAIL PROTECTED]> wrote: > I'm in a situation where it would be useful to bind a field in a table via > foreign keys to N other tables simultaneously. The table holds a common > type of info which all those other tables use. The many tabl

Re: [GENERAL] partial index on boolean, problem with v8.0.0rc1

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 20:18:57 +0200, Igor Shevchenko <[EMAIL PROTECTED]> wrote: > > Here's the problem: in the 2nd case, planner wouldn't choose an index scan > using partial index on "is_read" for the following queries: > > explain select * from user_msg where is_read=true; > explain selec

Re: [GENERAL] table with sort_key without gaps

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 19:37:41 +0100, Janning Vygen <[EMAIL PROTECTED]> wrote: > > the other reason why i wanted gapless sequences was that i would love to use > the id in an URL. But this is easy to manage to translate a positional id in > an URL to the database id. For this you probably

Re: [GENERAL] table with sort_key without gaps

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 19:37:41 +0100, Janning Vygen <[EMAIL PROTECTED]> wrote: > > ok, i have users which wants to manage their sporting competitions which > (simplified) has games and fixtures (in german "Spieltage", i hope the word > fixtures is understandable). Like German "Bundesliga" ha

Re: [GENERAL] Select after insert to the unique column

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 17:04:17 +0100, [EMAIL PROTECTED] wrote: > Thank you for your answer. I think it's very interesting behaviour. Is > it a feature or bug ? Until version 8 (which is in release candidate status now), there was no way to recover from an error within a transaction other than

Re: [GENERAL] table with sort_key without gaps

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 10:58:25 +0100, Janning Vygen <[EMAIL PROTECTED]> wrote: > Am Samstag, 11. Dezember 2004 20:06 schrieb Bruno Wolff III: > > maybe your are right. But with Sequences i thought to have problems when i do > inserts in the middle of the sorting array.

Re: [GENERAL] vacuumdb

2004-12-11 Thread Bruno Wolff III
On Wed, Dec 08, 2004 at 09:45:53 -0800, Mark <[EMAIL PROTECTED]> wrote: > Hi, > What are recommendations about running vacuumdb? You need to VACUUM tables to reclaim space created by DELETE and UPDATE commands. You need to run ANALYZE tables when their distribution of data changes. If you are do

Re: [GENERAL] question: how to preload data and excute table creation scripts

2004-12-11 Thread Bruno Wolff III
On Wed, Dec 08, 2004 at 08:58:49 -0800, Mark <[EMAIL PROTECTED]> wrote: > Hi, > > I guess is simple, but cannot find out how to run scripts in psql( > Linux) > > What I would like to do is following: > > 1. Create a table structure from scripts ? > 2. Preload data to remote Linux box (IP added

Re: [GENERAL] Select after insert to the unique column

2004-12-11 Thread Bruno Wolff III
On Wed, Dec 08, 2004 at 14:50:04 +0100, Julian Legeny <[EMAIL PROTECTED]> wrote: > Hello, > >Then I want to process command > select count(*) from UNIQUE_COLUMN_TEST >that I want to know how many records was already inserted before id >faied. > >But when I try to process t

Re: [GENERAL] table with sort_key without gaps

2004-12-11 Thread Bruno Wolff III
On Thu, Dec 09, 2004 at 18:32:19 +0100, Janning Vygen <[EMAIL PROTECTED]> wrote: > > "id" should be positive > "id" should not have gaps within the same account > "id" should start counting by 1 for each account > > i cant use sequences because they are producing gaps and doesn't start > coun

Re: [GENERAL] Simple function

2004-12-11 Thread Bruno Wolff III
On Tue, Dec 07, 2004 at 14:49:14 -0300, MaRCeLO PeReiRA <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a table with two integer fields (field1 and > field2)... > > I would like to construct a function that perform an > operation with this two fiels (field1 + fields2), and > return the string

Re: [GENERAL] No mailing list posts

2004-12-11 Thread Bruno Wolff III
On Wed, Dec 08, 2004 at 08:41:19 -0600, Don Isgitt <[EMAIL PROTECTED]> wrote: > > I have received no posts from GENERAL since yesterday morning; is the > list broken? Thank you. When you suspect a problem with a list it is generally best not to send a message to the list asking if it is down o

Re: [GENERAL] Fwd: 8.0 vs. 7.4 benchmarks

2004-12-10 Thread Bruno Wolff III
On Tue, Dec 07, 2004 at 08:43:03 -0800, "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > > IMHO 8.0 means, hey all you external developers -- time to test > with your applications and report bugs. > > 8.1 means, alright we got some wide reports -- fixed a few mistakes > and now were ready. That

Re: [GENERAL] Fwd: 8.0 vs. 7.4 benchmarks

2004-12-07 Thread Bruno Wolff III
On Tue, Dec 07, 2004 at 14:47:58 +0530, Postgres Learner <[EMAIL PROTECTED]> wrote: > > Has anyone done any performance benchmarking of postgresql 7.4 vs 8.0? > Are there any scenarios where 8.0 can be expected to be faster? Have you read the release notes? > I would love to get my hands on a

Re: [GENERAL] Constaints

2004-12-05 Thread Bruno Wolff III
On Sun, Dec 05, 2004 at 17:48:32 +, Jake Stride <[EMAIL PROTECTED]> wrote: > Would this be a postgresql session? If so how do I go about accessing it > from a query/setting the value of it? I have looked at set authorization > but I don't think this is where I should be looking! At the sta

Re: [GENERAL] Constaints

2004-12-05 Thread Bruno Wolff III
On Sun, Dec 05, 2004 at 16:55:33 +, Jake Stride <[EMAIL PROTECTED]> wrote: > Is there anyway to declare a constant that you can then use within a > postgresql 'session', i am connecting from a PHP based application and > trying to integrate another. > > What I want to be able to do is setu

Re: [GENERAL] Preview of Fourth PostgreSQL RFD.

2004-12-05 Thread Bruno Wolff III
On Sat, Dec 04, 2004 at 14:07:50 -0800, Mike Cox <[EMAIL PROTECTED]> wrote: > > Core PostgreSQL development, bug reports, are off-topic in > comp.databases.postgresql. Those topics are to be discussed in pgsql.* or > the PostgreSQL mailing lists. I think this is going a bit far. I think the pr

Re: [GENERAL] Indexes?

2004-12-03 Thread Bruno Wolff III
On Thu, Dec 02, 2004 at 22:37:38 -0800, Vincent Hikida <[EMAIL PROTECTED]> wrote: > 2004-12-01 2003-02-22 > 2005-03-04 2003-02-22 (a) > 2005-03-05 2004-12-15 (b) > 2005-03-05 2004-06-18 (c) > 2007-04-12 2005-06-18 (d) > > Let's say that there are a millio

Re: [GENERAL] data integrity and inserts

2004-12-02 Thread Bruno Wolff III
On Thu, Dec 02, 2004 at 14:20:35 -0600, Timothy Perrigo <[EMAIL PROTECTED]> wrote: > The first way also makes it possible to put the constraint on multiple > fields: > > create unique index uidx_abc on my_table(col_a, col_b, col_c); You can do that with unique constraints as well. ---

Re: [GENERAL] Indexes?

2004-12-02 Thread Bruno Wolff III
On Wed, Dec 01, 2004 at 23:16:48 -0800, Vincent Hikida <[EMAIL PROTECTED]> wrote: > I believe that it is better to have a concatenated key of > (toDate,FromDate). The reason the toDate should come first is that for more > "recent" records, finding curDates less than toDate is much more selectiv

Re: [GENERAL] Indexes?

2004-12-02 Thread Bruno Wolff III
On Thu, Dec 02, 2004 at 07:11:29 +0100, Bjørn T Johansen <[EMAIL PROTECTED]> wrote: > I have a table where I need to use "..where curdate between fromDate and > toDate". > Is it best to have two indexes, one for FromDate and one for toDate or just > one index for both the fields? Assuming that

Re: [GENERAL] data integrity and inserts

2004-12-01 Thread Bruno Wolff III
On Wed, Dec 01, 2004 at 10:48:40 -0800, Scott Frankel <[EMAIL PROTECTED]> wrote: > > 1. > CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text); > CREATE UNIQUE INDEX uidx_thename ON names(the_name); > > vs. > > 2. > CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text UN

Re: [GENERAL] Displaying more than six digits from a real number

2004-12-01 Thread Bruno Wolff III
On Wed, Dec 01, 2004 at 20:25:28 -0300, Clodoaldo Pinto <[EMAIL PROTECTED]> wrote: > The 7.4.2 manual says the precision of a real number is 6 decimal digits. > > Is it possible to force the display of more than six decimal digits of a real > number whithout using to_char() or casting? I think

Re: [GENERAL] [HACKERS] Adding Reply-To: to Lists configuration ...

2004-12-01 Thread Bruno Wolff III
On Wed, Dec 01, 2004 at 09:33:18 +, Chris Green <[EMAIL PROTECTED]> wrote: > On Wed, Dec 01, 2004 at 02:02:41AM -0600, Bruno Wolff III wrote: > > On Mon, Nov 29, 2004 at 12:49:46 +, > > Chris Green <[EMAIL PROTECTED]> wrote: > > > > > > Th

Re: [GENERAL] [HACKERS] Adding Reply-To: to Lists configuration ...

2004-11-30 Thread Bruno Wolff III
On Mon, Nov 29, 2004 at 12:49:46 +, Chris Green <[EMAIL PROTECTED]> wrote: > > This is a perpetual problem, if people all used the same MUA and > (assuming it has the capability) all used the 'reply to list' command > to reply to the list everything would be wonderful! :-) I think using ma

Re: [GENERAL] Error dropping non-existent tables

2004-11-20 Thread Bruno Wolff III
On Sat, Nov 20, 2004 at 10:15:46 -0800, Baldeep Hira <[EMAIL PROTECTED]> wrote: > How do I move the "DROP TABLE" commands into a separate transaction? I > could move all the "DROP TABLE" commands into a separate sql-script > file, but then I never know which of the tables are existing in the > da

Re: [GENERAL] Error dropping non-existent tables

2004-11-20 Thread Bruno Wolff III
On Fri, Nov 19, 2004 at 21:38:33 -0800, Baldeep Hira <[EMAIL PROTECTED]> wrote: > > I am able to drop tables in PostgreSQL, but the problem arises when > the table does not exist and I try to execute a "drop table" command. The simplest fix is to do the drop table outside of a transaction (so t

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Bruno Wolff III
On Fri, Nov 19, 2004 at 15:47:21 +0100, Marc Boucher <[EMAIL PROTECTED]> wrote: > I know that, but I've some comparisons with other queries. And someone > advised me to try "set enable_seqscan=off;". It takes 50-60% (after > checking right now) less to use the index. Unfortunately I can't use thi

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Bruno Wolff III
On Fri, Nov 19, 2004 at 14:45:04 +0100, Marc Boucher <[EMAIL PROTECTED]> wrote: > At 16:23 18/11/2004 +0100, Martijn van Oosterhout wrote: > > The system seems to think that a scan is cheap because the table is so > > small. > The table currently contains just over 1 elements. So 238 rows is

Re: [NOVICE] [GENERAL] OID Question

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 15:34:14 -0500, Geoffrey <[EMAIL PROTECTED]> wrote: > > "Whenever an application makes use of OIDs to identify specific rows of > a table, it is recommended to create a unique constraint on the oid > column of that table, to ensure that OIDs in the table will indeed >

Re: [GENERAL] When to switch to Postgres 8.0?

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 14:17:41 -0500, [EMAIL PROTECTED] wrote: > My company has a product in beta which uses Postgres 7.4.3. We expect > to have a code freeze for our 1.0 product in March 2005. I'd really > like to use Postgres 8.x in our 1.0 product. We're especially looking > forward to the b

Re: [GENERAL] DROP DATABASE, but still there

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 14:17:45 -0500, Robert Fitzpatrick <[EMAIL PROTECTED]> wrote: > On Thu, 2004-11-11 at 14:03, Doug McNaught wrote: > > Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > > > > > What does it mean when you drop a database and then recreate with the > > > same name and all the

Re: [GENERAL] OID Question

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 10:04:30 -0500, Terry Lee Tucker <[EMAIL PROTECTED]> wrote: > Greetings, > > Here is a simple question: > > Is it ok to put a unique index on the oid for my tables? We are in the > process Yes, but you may occasionally have insert failures if the oid wraps around and

Re: [GENERAL] making another super user other than postgres

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 10:31:28 -0500, Bob Powell <[EMAIL PROTECTED]> wrote: > Hello everyone; > > My systems admin says that he needs to have use of the Postgres user > without a password. His Debian package manager requires this. > > He tells me that he can lock down that user on the syst

Re: [GENERAL] Last value inserted

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 09:59:16 -0300, MaRCeLO PeReiRA <[EMAIL PROTECTED]> wrote: > > Well, once I do an INSERT in the parent table, how can > I know (for sure) which number id was generated by the > sequence? Use currval. ---(end of broadcast)-

Re: [GENERAL] Important Info on comp.databases.postgresql.general

2004-11-11 Thread Bruno Wolff III
On Thu, Nov 11, 2004 at 01:23:08 -0700, Net Virtual Mailing Lists <[EMAIL PROTECTED]> wrote: > Hi Kevin, > > I'm probably a bit more concerned about this than you are... I don't > want to have to post anonymously just to protect my email address... The lists are already publically archived and

Re: [GENERAL] Can this be indexed?

2004-11-08 Thread Bruno Wolff III
On Sun, Nov 07, 2004 at 09:29:30 +, Jerry III <[EMAIL PROTECTED]> wrote: > But if you do build an index over "id" then pgsql would only have to do a > sequential scan on that index, which might be a lot faster if your table > contains a lot of other data, won't it? A full table index scan

Re: [GENERAL] Postgres Versions / Releases

2004-11-02 Thread Bruno Wolff III
On Tue, Nov 02, 2004 at 19:09:02 +1100, Alex P <[EMAIL PROTECTED]> wrote: > Will there be a release 7.4.7 in the future? You can get a snapshot of the 7.4 stable cvs if there is some post 7.4.6 fix you are interested in, before there is a 7.4.7 release. ---(end of broad

Re: [GENERAL] Comment on timezone and interval types

2004-10-29 Thread Bruno Wolff III
On Fri, Oct 29, 2004 at 11:14:31 -0600, Guy Fraser <[EMAIL PROTECTED]> wrote: > > 1 day should always be calculated as 24 hours, just as an hour > is calculated as 60 minutes... If you want 24 hours you can use 24 hours. Days are not constant length, just like months aren't constant length. >

Re: [GENERAL] primary key and existing unique fields

2004-10-28 Thread Bruno Wolff III
On Thu, Oct 28, 2004 at 14:31:32 +, Sally Sally <[EMAIL PROTECTED]> wrote: > Dawid, > I am interested in the first point you made that: > having varchar(12) in every referencing table, takes more storage > space. > The thing is though, if I have a serial primary key then it would be an > add

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-28 Thread Bruno Wolff III
On Wed, Oct 27, 2004 at 16:26:13 -0600, Guy Fraser <[EMAIL PROTECTED]> wrote: > > When calculating any usage based on time, it is a good idea to > store usage in days:hours:minutes:seconds because they are static > and stable, if you discount the deceleration of the earth and > corrections in

Re: [GENERAL] Bug or stupidity

2004-10-27 Thread Bruno Wolff III
On Wed, Oct 27, 2004 at 22:10:05 +0200, > 2. Let's change so that "add_missing_from" is disabled by default and > doesn't affect the DELETE statement at all. That is supposed to happen. My memory was that 8.0 was the release that the default was going to change, but if not then it should be 8.1.

Re: [GENERAL] primary key and existing unique fields

2004-10-27 Thread Bruno Wolff III
On Wed, Oct 27, 2004 at 00:10:27 +0200, Dawid Kuroczko <[EMAIL PROTECTED]> wrote: > 3. If you'll need things like "last 50 keys", you can SELECT * FROM > foo ORDER BY yourserialkey DESC LIMIT 50; You really shouldn't be doing that if you are using sequences to generate the key. Sequences are jus

<    1   2   3   4   5   6   7   8   >