Re: [GENERAL] I spoke with Marc from the postgresql mailing list.

2004-11-12 Thread Marc G. Fournier
On Sat, 13 Nov 2004, Gary L. Burnore wrote: This isn't about encouraging ISP's to carry your lists. It's about fixing a problem caused by your list's gateways. A problem that you perceive, yet nobody else seems to ... very isolated problem ... of coufse, you *could* set the group to moderated on

Re: [GENERAL] I spoke with Marc from the postgresql mailing list.

2004-11-12 Thread Jan Wieck
On 11/7/2004 8:06 PM, Brian {Hamilton Kelly} wrote: On Sunday, in article <[EMAIL PROTECTED]> [EMAIL PROTECTED] "Mike Cox" wrote: Also, he pointed out that for those who want to get the postgresql groups when their usenet sever doesn't carry them, the solution would be to point their newsreade

Re: [GENERAL] Problem with showing time diff?

2004-11-12 Thread Michael Fuhr
On Thu, Nov 11, 2004 at 11:55:33AM +0100, Bjørn T Johansen wrote: > > select to_char((Log_Fortrykk.SistePlate::time - > OrdreNew.SistePlate::time)::interval,'HH24:MI') as diff from Log_Fortrykk > > I need the output to be HH:MM, e.g. 00:09... But my prb is when this diff > is less than 0, it sh

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-12 Thread Marc G. Fournier
On Sun, 7 Nov 2004, Russ Allbery wrote: Yeah, I understand it's not how the groups are set up, but it does seem a little confusing. (Posting to a Usenet newsgroup and getting an e-mail reply saying that my mailing list message is being held for approval, for example.) I think it's a really goo

Re: [GENERAL] I spoke with Marc from the postgresql mailing list.

2004-11-12 Thread Jeff Eckermann
--- Brian {Hamilton Kelly} <[EMAIL PROTECTED]> wrote: > Which only confirms my opinion that he's a fuckwit. Evidently some of the nastiness out there on Usenet is propagating into our lists in advance of any change. __ Do you Yahoo!? Check ou

Re: [GENERAL] dumping on 7.4.6 importing on 7.4.1

2004-11-12 Thread Tom Lane
stig erikson <[EMAIL PROTECTED]> writes: > i could not find any official builds for rh8, does the rh9 rpms work? Doubtful. What I'd recommend is getting the source RPM and building your own binary RPMs --- that's pretty much certain to work. All you need is rpmbuild --rebuild --define='b

Re: [GENERAL] I spoke with Marc from the postgresql mailing list.

2004-11-12 Thread Brian {Hamilton Kelly}
On Sunday, in article <[EMAIL PROTECTED]> [EMAIL PROTECTED] "Mike Cox" wrote: > Also, he pointed out that for those who want to get the postgresql groups > when their usenet sever doesn't carry them, the solution would be to point > their newsreaders to news.postgresql.org. Which only confir

Re: [GENERAL] dumping on 7.4.6 importing on 7.4.1

2004-11-12 Thread stig erikson
Tom Lane wrote: Is it possible to dump a database on a 7.4.6 server and then restore it on a 7.4.1 server? Should work, but why aren't you updating the 7.4.1 server? There were some pretty nasty bugs fixed between .1 and .6. problem is i dont have full power over that machine. i will try to talk

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-12 Thread Russ Allbery
Marc G Fournier <[EMAIL PROTECTED]> writes: > We are doing that specifically for that reason ... In order to provide > redundancy, we currently have two mail<->news gateways of the mailing > lists in place, and the MessageIds are what prevents duplicates ... Yeah, I just found out about that toda

Re: [GENERAL] I spoke with Marc from the postgresql mailing list.

2004-11-12 Thread Woodchuck Bill
Mike Cox <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED] berlin.de: > Uhh. My head is spinning with the complexity of this. Marc is fine with > being in the big eight official *if* the groups stay the same and it > doesn't affect the mailing list. This will just have to be a bug in the > syst

Re: [GENERAL] invalid page header in block 52979 of relation "pg_attribute"

2004-11-12 Thread Steve Crawford
On Friday 12 November 2004 7:54 am, Martijn van Oosterhout wrote: > On Thu, Nov 11, 2004 at 04:29:38PM -0700, Steve Crawford wrote: > > True. I hadn't come up with a good time to get past that 7.4.1 -> > > 7.4.2 initdb requirement. I guess I'll have to go with the manual > > method. > > IIRC, the i

Re: [GENERAL] sub-query question

2004-11-12 Thread Scott Frankel
Cooking with gas once again ;) Thanks for the info on JOINs! Scott On Nov 12, 2004, at 9:52 AM, Scott Frankel wrote: How does one embed a sub-query lookup to one table in order to replace a foreign key id number with it's name in a SELECT on a second table? i.e.: given the following two tables,

Re: [GENERAL] sub-query question

2004-11-12 Thread Michael Fuhr
On Fri, Nov 12, 2004 at 11:26:14AM -0700, Michael Fuhr wrote: > There are at least four ways to write the join query you want: I may have misunderstood what results you're looking for, but the examples I gave may nevertheless be useful. Sorry if they cause any confusion. -- Michael Fuhr http:/

Re: [GENERAL] sub-query question

2004-11-12 Thread Michael Fuhr
On Fri, Nov 12, 2004 at 09:52:09AM -0800, Scott Frankel wrote: > > How does one embed a sub-query lookup to one table in order to > replace a foreign key id number with it's name in a SELECT on a > second table? You're talking about joins. http://www.postgresql.org/docs/7.4/static/tutorial-join.

Re: [GENERAL] sub-query question

2004-11-12 Thread Tom Lane
Scott Frankel <[EMAIL PROTECTED]> writes: > Here's my query: > SELECT ( > u.color_id = ( > SELECT c.color_name > FROM colors c > WHERE color_id = 1)) AS color_name, > u.name, u.the_date > FROM users u >WHERE

Re: [GENERAL] sub-query question

2004-11-12 Thread Franco Bruno Borghesi
something == otherthing is a boolean expression, you are asking the database to compare both values, u.color_id is not equal c.color_name, that's why you get 'f'. I guess that you want to replace the color_id from users by the corresponding color_name from colors: SELECT c.color_name, u.nam

[GENERAL] sub-query question

2004-11-12 Thread Scott Frankel
How does one embed a sub-query lookup to one table in order to replace a foreign key id number with it's name in a SELECT on a second table? i.e.: given the following two tables, I want to replace the color_id of 1 with the color_name 'red.' (The SQL to create the two tables follows below.) tes

[GENERAL] How to use custom functions created by my2pg.pl?

2004-11-12 Thread Scott Chapman
The my2pg.pl script creates custom functions that help with the MySQL "set" column type. I can't figure out how to use the functions once I have the database migrated into Postgres. Can someone please explain how to make use of them? In MySQL, the table exists: CREATE TABLE accessright ( acce

Re: [GENERAL] simple query question: return latest

2004-11-12 Thread Scott Frankel
On Nov 12, 2004, at 8:24 AM, Michael Fuhr wrote: [Top-posting fixed] On Fri, Nov 12, 2004 at 09:06:08AM -0500, Goutam Paruchuri wrote: Scott Frankel wrote: ORDER BY DESC LIMIT 1 is much simpler and more readable than a sub-query. Though the sub-query approach looks to be a good template for ensuri

Re: [GENERAL] simple query question: return latest

2004-11-12 Thread Michael Fuhr
[Top-posting fixed] On Fri, Nov 12, 2004 at 09:06:08AM -0500, Goutam Paruchuri wrote: > Scott Frankel wrote: > > > ORDER BY DESC LIMIT 1 is much simpler and more readable than a > > sub-query. Though the sub-query approach looks to be a good template > > for ensuring more accurate results by bei

Re: [GENERAL] How many secondary databases can I create?

2004-11-12 Thread Michelle Konzack
Hello Martijn, Am 2004-11-12 17:01:20, schrieb Martijn van Oosterhout: > As many as you have disk space for I guess. You might need one > postmaster per location but I'm not sure about that, check the docs... I have read, that the "secondary databases" are attached to the main database which mea

Re: [GENERAL] How many secondary databases can I create?

2004-11-12 Thread Martijn van Oosterhout
As many as you have disk space for I guess. You might need one postmaster per location but I'm not sure about that, check the docs... On Fri, Nov 12, 2004 at 04:18:13PM +0100, Michelle Konzack wrote: > Hello all, > > I have accidently :-) found 'initlocation' and now I like to > know, how many s

Re: [GENERAL] invalid page header in block 52979 of relation "pg_attribute"

2004-11-12 Thread Martijn van Oosterhout
On Thu, Nov 11, 2004 at 04:29:38PM -0700, Steve Crawford wrote: > True. I hadn't come up with a good time to get past that 7.4.1 -> > 7.4.2 initdb requirement. I guess I'll have to go with the manual > method. IIRC, the initdb is recommended, but not required. It can be done without an initdb t

[GENERAL] How many secondary databases can I create?

2004-11-12 Thread Michelle Konzack
Hello all, I have accidently :-) found 'initlocation' and now I like to know, how many secondary database i can create. I like to do that, because I have a Virtual Webserver and for each VirtualHost I have a local $USER. Now I like to create seperatly secondary databases for each $USER/VHost. T

Re: [GENERAL] simple query question: return latest

2004-11-12 Thread Goutam Paruchuri
If 2 days are equal for color red, you still would get 2 rows returned. Maybe the below is accurate. SELECT g.color, g.date, g.entered_by FROM giventable g WHERE g.color = 'red' AND g.date = (SELECT MAX(g2.date) FROM giventable g2

Re: [GENERAL] query with table alias

2004-11-12 Thread Matteo Beccati
prr=# select foo.c1, f.c2 from foo f; -- >>> Incorrect result <<< The result of the "select foo.c1, f.c2 from foo f" isn't correct, it do a cartesian product of foo table. foo is aliased to f, so there's no table named foo in the from clause. By default postgres tries to add the missing table n

Re: [GENERAL] query with table alias

2004-11-12 Thread Patrick Fiche
Title: query with table alias The correct query would be "select f.c1, f.c2 from foo f;" if you want to use alias   Patrick   --- Patrick Fiche email : [EMAIL PROTECTED] tél : 01 69 29 36 18 --

Re: [GENERAL] query with table alias

2004-11-12 Thread Michael Glaesemann
On Nov 12, 2004, at 7:48 PM, Rodríguez Rodríguez, Pere wrote: prr=# select foo.c1, f.c2 from foo f;  -- >>> Incorrect result <<<  c1 | c2 +   1 |  1   2 |  1   1 |  2   2 |  2 (4 filas) If you alias a table, you can only reference the table using the alias. It is in effect renamed: foo is

[GENERAL] query with table alias

2004-11-12 Thread "Rodríguez Rodríguez, Pere"
Title: query with table alias Hello, I think I have found a query problem when the query has an alias for a table and use alias item and table name. I ilustrate the problem with a simple table and query. prr=# create table foo (c1 int2, c2 int2); CREATE TABLE prr=# insert into foo values

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

2004-11-12 Thread Oliver Elphick
On Thu, 2004-11-11 at 15:31, Bob Powell wrote: > My systems admin says that he needs to have use of the Postgres user > without a password. His Debian package manager requires this. The PostgreSQL user "postgres" is given the ability to connect to any database on the local machine without suppl