Re: [GENERAL] Spurious rows returned with left join?

2006-04-04 Thread Edmund Bacon
Tom Lane wrote: Edmund Bacon <[EMAIL PROTECTED]> writes: Consider the following: ... Note that I get 2 rows where t1_a = 3. Are you getting a Merge Right Join plan for that? If so, you're likely getting bit by this bug: 2006-03-17 14:38 tgl That's correct.

[GENERAL] Spurious rows returned with left join?

2006-04-04 Thread Edmund Bacon
1_a = t2_a; which does return just one row for t1_a =3 for all postgres versions I have currently available. Edmund ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] joining tables

2006-01-23 Thread Edmund
[EMAIL PROTECTED] writes: > Hi, > > If you have two tables, each with a column called "keys" and a column > called "values", and they are both incomplete, such as: > > table 1: > > keys | values > -+-- > 1| (null) > 2| two > 3| (null) > > table 2: > > keys | values > -

Re: [GENERAL] find last day of month

2005-12-09 Thread Edmund
"Andrus Moor" <[EMAIL PROTECTED]> writes: > I have a table containing month column in format mm. > > create table months ( tmkuu c(7)); > insert into months values ('01.2005'); > insert into months values ('02.2005'); > > How to create select statement which converts this column to date type

Re: [GENERAL] Select all invalid e-mail addresses

2005-10-20 Thread Edmund
"Andrus" <[EMAIL PROTECTED]> writes: > I have a database of e-mail addresses. > > I want to select the email addresses which are not valid: > > do not contain exactly one @ character, > contain ; > < " ' , characters or spaces etc. > > What is the WHERE clause for this ? > There was a thread

Re: [GENERAL] Generating random values.

2005-08-18 Thread Edmund
[EMAIL PROTECTED] ("Joshua D. Drake") writes: > Fernando Lujan wrote: > > Hi folks, > > I have a table wich contains my users... I want to insert to each > > user > > a random password, so I need a random function. Is there such function > > in Postgres? I just found the RANDOM which generates val

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-03 Thread Edmund Dengler
mapping a class hierarchy to > table(s). A few techniques are described in Fowler's > Patterns of Enterprise Application Architecture. > > hope this helps, > > Eugene > > > --- Edmund Dengler <[EMAIL PROTECTED]> wrote: > > > Greetings! > > > &

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Edmund Dengler
Greetings! I have already increased the stats from 10 to 100. In addition, if I specify individual tables, then the indexes are used. However, when I go through the , then indexes are not used. I will try and expand the statistics, but suspect it is not the root cause of the problem. Regards! Ed

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Edmund Dengler
causes the indexes to be used - still trying to make sure it is a legitimate method). Regards! Ed -- Forwarded message -- Date: Fri, 29 Jul 2005 14:23:29 -0400 (EDT) From: Edmund Dengler <[EMAIL PROTECTED]> To: Postgresql-General Subject: Re: [GENERAL] Failure to use i

Re: [GENERAL] Failure to use indexes

2005-07-29 Thread Edmund Dengler
set to compare against), I get sequential scanning, event though the set size is only a single element. Regards! Ed On Fri, 29 Jul 2005, Edmund Dengler wrote: > Greetings! > > I am using to partition several tables. When I perform a query > on another table, and then try to join against

[GENERAL] Failure to use indexes

2005-07-29 Thread Edmund Dengler
Greetings! I am using to partition several tables. When I perform a query on another table, and then try to join against an inherited table set, the optimizer does not use any indexes to perform the join. This is 8.0.1. Is this fixed in 8.0.2 or 8.0.3? The query: explain select * from ( se

Re: [GENERAL] Copying bytea data out via pgsql

2005-07-23 Thread Edmund
[EMAIL PROTECTED] (Leonel Nunez) writes: > John Wells wrote: > > >Guys, > > > >I have a number of jpegs and tiffs that are stored in a bytea field in a > >PostgreSQL database by a Java program using Hibernate. > > > >I need to copy these out to a flat file via pgsql for viewing, etc. I've > >tri

Re: [GENERAL] Deletes and large tables

2005-06-10 Thread Edmund Dengler
e delete was taking less than a second. > > Hope it help > /David > > > > >Regards! > >Ed > > > > > >On Fri, 10 Jun 2005, Richard Huxton wrote: > > > > > > > >>Edmund Dengler wrote: > >> > >> > >&

Re: [GENERAL] Deletes and large tables

2005-06-10 Thread Edmund Dengler
, I would expect I/O issues/bounds and not CPU. Regards! Ed On Fri, 10 Jun 2005, Richard Huxton wrote: > Edmund Dengler wrote: > > Greetings! > > > > We have a table with more than 250 million rows. I am trying to delete the > > first 100,000 rows (based on a bigint

[GENERAL] Deletes and large tables

2005-06-10 Thread Edmund Dengler
Greetings! We have a table with more than 250 million rows. I am trying to delete the first 100,000 rows (based on a bigint primary key), and I had to cancel after 4 hours of the system not actually finishing the delete. I wrote a script to delete individual rows 10,000 at a time using transaction

[GENERAL] INHERITS and planning

2005-06-09 Thread Edmund Dengler
Greetings! Is there an issue when a large number of INHERITS tables exist for planning? We have 2 base tables, and use INHERITS to partition the data. When we get around 2000-2200 sub-tables (approx 1000-1100 per base table), planning a SELECT statement on the base table (ie, to search all sub-ta

Re: [GENERAL] vulnerability/SSL (fwd)

2005-06-08 Thread Edmund Dengler
Greetings! Does anybody know how well the optimizer works when dealing with inherited tables? I am currently using 8.0.1. I have a table called eventlog.record_main, and a number of inherited tables to partition the data (called eventlog_partition.___record_main). is the primary key (all tables

[GENERAL] Optimizer and inherited tables

2005-06-08 Thread Edmund Dengler
(Sorry, wrong subject line got sent) Greetings! Does anybody know how well the optimizer works when dealing with inherited tables? I am currently using 8.0.1. I have a table called eventlog.record_main, and a number of inherited tables to partition the data (called eventlog_partition.___record_m

Re: [GENERAL] hpw to Count without group by

2005-06-02 Thread Edmund Bacon
[EMAIL PROTECTED] (Yudie Pg) writes: > Hello, > I have a table, structure like this: > create table product( > sku, int4 not null, > category int4 null, > display_name varchar(100) null, > rank int4 null > ) > let say example data: > sku, category, display_name > === > 10

Re: [GENERAL] Count and Results together

2005-05-20 Thread Edmund Bacon
[EMAIL PROTECTED] ("Jan Sunavec") writes: > I am using libpg.so. I assume that you mean libpq ? >I tryed find solution for this problem in > internet but, I don't find nothing yet. I have idea get rowcount > throught some function write in C. Or is there any plan add this > feature into Postgre

Re: [GENERAL] CSV delim quoting differences PgCOPY, Excel etc...

2005-05-18 Thread Edmund Bacon
[EMAIL PROTECTED] (Jerry Sievers) writes: > Hello. > > Anyway, I am often enough having to load Pg databases using SQL COPY > from CSV output written by Excel, that I've had to write a script to > change the quoting behavior from Excel's putting double quotes around > a field having embedded deli

Re: [GENERAL] Debugging deadlocks

2005-04-02 Thread Edmund Bacon
[EMAIL PROTECTED] (Bruno Wolff III) writes: > Using domains is a good way to keep column constraints in just one place. > Speaking of domains, how do you find out what the range of a domain is? eg: test=# create domain fruit as text check( value in ('apple', 'orange', 'banana', 'pear')); CREAT

Re: [GENERAL] Stuck with a query...

2005-03-13 Thread Edmund Bacon
[EMAIL PROTECTED] (Greg Stark) writes: > Geoff Caplan <[EMAIL PROTECTED]> writes: > > > Hi folks, > > > > Sorry to ask a newbie SQL question but I'm struggling... > > There's no efficient way to write this in standard SQL. However Postgres has > an extension DISTINCT ON that would do it: > > s

Re: [GENERAL] fied separator change from the shell command line

2005-03-13 Thread Edmund Bacon
[EMAIL PROTECTED] writes: > Hello, > > I'm trying to change the usal "|" table field separator from the shell > command line: > psql -d ect -f pl_lost.sql -o pl_lost.out.txt -F "\t" -U asaadmin > > But it doesn't work. It keeps the same "|" separator in the output > file. > Can anyone please he

Re: [GENERAL] Novice Question

2005-03-01 Thread Edmund Bacon
[EMAIL PROTECTED] (Michael Romagnoli) writes: > What kind of command would I run if I wanted to copy an entire table > (along with renaming it, and, of course, all data from the first table > - > some of which is binary)? SELECT * INTO newtable FROM oldtable; Note that this doesn't construct ind

Re: [GENERAL] basic trigger using OLD not working?

2005-02-28 Thread Edmund Bacon
[EMAIL PROTECTED] (Rick Casey) writes: > CREATE OR REPLACE FUNCTION logPedigreesDel() RETURNS TRIGGER AS ' > begin > RAISE EXCEPTION ''OLD.famindid = '', OLD.famindid; RAISE EXCEPTION ''OLD.famindid = %'', OLD.famindid; ^ > return OLD; > end;

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-22 Thread Edmund Bacon
[EMAIL PROTECTED] (Russell Smith) writes: > On Mon, 21 Feb 2005 08:05 pm, Surabhi Ahuja wrote: > > do you still experience problems when you run > > LDLIBRARY=/usr/local/pgsql/lib ./sample > > Note there is no SPACE in the example I have given. > LDLIBRARY=/usr/local... > > NOT > > LDLIBRARY =

Re: [GENERAL] hung postmaster?

2005-02-20 Thread Edmund Bacon
[EMAIL PROTECTED] ("Ed L.") writes: > > Workin' on gdb/strace build, but having trouble with both. Gdb > just doesn't build from source, not sure why yet, and no depots > found at porting center. It doesn't appear that strace is > supported for 11.23 itanium based on strace README/PORTING fi

Re: [GENERAL] Multi-column indexes

2005-01-15 Thread Edmund Dengler
Hi Tom! Yep, there are a large number of host_luid/log_luid combinations (there are approximatly 5-10 hosts and 1-3 logs per system we are running). Thanks for the recommended workaround, I'll have a try at it at some point tomorrow. Regards! Ed On Sat, 15 Jan 2005, Tom Lane wrote: >

[GENERAL] Multi-column indexes

2005-01-15 Thread Edmund Dengler
Greetings! I have a technical question concerning multi-column indexes and their implementation. I tried looking for the answr in the docs but couldn't find anything. I have the following table: eventlog=> \d agent.record Table "agent.record" Colu

[GENERAL] select into temp tables withough using EXECUTE in plpgsql

2004-11-24 Thread Edmund Kleiser
ct). Any advice on how to select from a temp table into a variable wuold be gratefully recieved. Many Thanks Edmund ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PR

Re: [GENERAL] disabling constraints

2004-11-07 Thread Edmund Bacon
[EMAIL PROTECTED] (Vivek Khera) writes: > > "DP" == David Parker <[EMAIL PROTECTED]> writes: > > DP> I would like to be able to truncate all of the tables in a schema > DP> without worrying about FK constraints. I tried issuing a "SET > DP> CONSTRAINTS ALL DEFERRED" before truncating, but I s

[GENERAL] UTF-8 and =, LIKE problems

2004-11-03 Thread Edmund Lian
ot;79 Brisbane Street". Is there any way to get PostgreSQL to do so? Failing this, is there any way to get PostgreSQL to be a bit smarter in doing comparisons? I think I'm SOL, but I thought I'd ask anyway. ...Edmund. ---(end of broadcast)--

Re: [GENERAL] adding missing FROM-clause

2004-10-31 Thread Edmund Bacon
[EMAIL PROTECTED] ("C G") writes: > Dear All, > > I have a simple join query > > SELECT c1 FROM t1 > INNER JOIN > t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3; > > Which gives the expected result but I get the message > NOTICE: adding missing FROM-clause entry for table "t3" > > How do I get rid of

Re: [GENERAL] Issue adding foreign key

2004-10-30 Thread Edmund Bacon
[EMAIL PROTECTED] ("George Woodring") writes: > I have 2 existing tables in my db: > > iss=> \d pollgrpinfo > Table "public.pollgrpinfo" > Column | Type | Modifiers > ---++--- > pollgrpinfoid | integer

Re: [GENERAL] ON DELETE trigger blocks delete from my table

2004-10-30 Thread Edmund Bacon
[EMAIL PROTECTED] ("Naeem Bari") writes: > I understand. Makes sense. Is there anyway for my trigger function to > "know" that it is being called on a delete or on an update? Because I do > need to "return new" on update... and I really don't want to write 2 > different functions, one for update a

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-03 Thread Edmund Bacon
[EMAIL PROTECTED] (mike cox) writes: > I'm running PostgreSQL 8.0 beta 1. I'm using the > earthdistance to find the distance between two > different latitude and logitude locations. > Unfortunately, the result seems to be wrong. > > Here is what I'm doing: > select > earth_distance(ll_to_earth(

Re: [GENERAL] SELECT based on function result

2004-07-18 Thread Edmund Bacon
Robert Fitzpatrick wrote: > I have a function that tells me if a record is positive and negative > based on several field values. I use it in select statements: > > ohc=> SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS > positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; >

Re: [GENERAL] Enough RAM for entire Database.. cost aside, is this

2004-07-08 Thread Edmund Dengler
Greetings! On Fri, 2 Jul 2004, Mike Rylander wrote: > I find that experience does not bear this out. There is a saying a coworker > of mine has about apps that try to solve problems, in this case caching, > that are well understood and generally handled well at other levels of the > "software st

[GENERAL] Unable to use index?

2004-04-29 Thread Edmund Dengler
Hi folks! A query I am running does not seem to use indexes that are available (running version 7.4.2). I have the following table: => \d replicated Table "public.replicated" Column | Type | Modifiers -+

[GENERAL] unsubscribe

2004-02-17 Thread Edmund Zynda
unsubscribe   EDMUND ZYNDA [EMAIL PROTECTED] FocalBase Internet Solutions p. 410.751.2093 x219 f. 410.751.2653 www.focalbase.com     <>

Re: [GENERAL] SET within a function?

2003-10-15 Thread Edmund Dengler
s not in the specification)? Performance? No support from the back-end? Something else? Regards, Ed On Wed, 15 Oct 2003, Tom Lane wrote: > Edmund Dengler <[EMAIL PROTECTED]> writes: > > ... I have no real choice in this as there is no way to specify that > > NULL == NULL. >

Re: [GENERAL] SET within a function?

2003-10-14 Thread Edmund Dengler
The problem I would face is that this still needs to be a sequential scan in the table rather than an index lookup. Regards, Ed On Tue, 14 Oct 2003, Arthur Ward wrote: > > Is the rewrite only for the literal 'X = NULL' or will it do a test > > against a value such as 'X = OLD.X' (and rewrite is

Re: [GENERAL] SET within a function?

2003-10-13 Thread Edmund Dengler
dummy value for the 'Not a valid value', but it seems to be quite awkward when I really do want the NULL. Regards! Ed On Mon, 13 Oct 2003, Bruno Wolff III wrote: > On Mon, Oct 13, 2003 at 21:16:33 -0400, > Edmund Dengler <[EMAIL PROTECTED]> wrote: > > > > I

[GENERAL] SET within a function?

2003-10-13 Thread Edmund Dengler
Hi all! I am doing some trigger functions that need to find a tuple in another table. The problem is that this second table is doing some summarization work, and I need nulls to equal each other. Basically, in the trigger I do a: SELECT INTO ... x FROM table1 WHERE ...(some straightforward

Re: [GENERAL] Buglist

2003-08-21 Thread Edmund Dengler
ble amount of time, and of doing it. Regards! Ed On Thu, 21 Aug 2003, Andrew Sullivan wrote: > On Thu, Aug 21, 2003 at 12:05:28PM -0400, Edmund Dengler wrote: > > Well, if they are locked waiting on vacuum, then vacuum should upgrade > > it's priority to the highest waiting proce

Re: [GENERAL] Bulk Insert / Update / Delete

2003-08-21 Thread Edmund Dengler
Wasn't there a feature in some SQL database which was the equivalent of UPDATE OR INSERT ... based on the primary key? Would this accomplish what you want (I know that I have a desire for this feature a couple of times, as I simply have code or triggers to essentially do the equivalent)? Is this a

Re: [GENERAL] Buglist

2003-08-21 Thread Edmund Dengler
Well, if they are locked waiting on vacuum, then vacuum should upgrade it's priority to the highest waiting process (priority inheritance). This way, vacuum will be running at a priority level equivalent to who is waiting on it. Regards, Ed On Thu, 21 Aug 2003, Andrew Sullivan wrote: > On Wed, A

Re: [GENERAL] Buglist

2003-08-20 Thread Edmund Dengler
What about the use of priority inheritance to deal with the issue of priority inversion (a standard methodology within the real-time world)? Then we could have priorities, but still have low priority processes bumped up if a high level one is waiting on them. Regards, Ed On Wed, 20 Aug 2003, Tom

Re: [GENERAL] Unused Indexes

2003-07-30 Thread EDMUND DENGLER
You need to convert the int's to bigints. select id where col1 = 1::bigint and col2 = 1::bigint Regards, Ed -Original Message- From: Tim McAuley <[EMAIL PROTECTED]> Date: Wed, 30 Jul 2003 13:46:46 To:[EMAIL PROTECTED] Subject: [GENERAL] Unused Indexes Hi, I have a table which I have p

[GENERAL] Storing double-byte strings in text fields.

2001-02-16 Thread edmund
eries. I'd also rather not use it as it will be easier to port my system to other servers if it just needs a plain vanilla install. I am currently using Postgresql 7.0.3 on RedHat 6.2 (x86) and also on YellowDog 1.2 (PPC). The web server is Apache 1.3.12 with PHP 4.0.x.

[GENERAL] How do I increase the maximum record size from 8K ?

1999-02-19 Thread Edmund
I've heard that you can recompile POSTGRES to allow larger than 8K records (tuples). I've looked everywhere and I haven't been able to find any information on it.. Anyone know how to do this or where I should look ? Thanks in advance.. C'ya, Edmund [EMAIL PROTECTED]

[GENERAL] [Fwd: PostgreSQL - Desparate!]

1998-08-02 Thread Edmund Mergl
Pardon the intrusion, but I have a dilemma which I cannot find the answer to, after searching the newsgroups, documentation, and mailing lists -- My postmaster will not start. Below is a message I've posted in several newsgroups. If you could make ANY suggestions on getting postmaster to wor