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] change natural column order

2004-11-30 Thread Tino Wildenhain
Hi, Am Mittwoch, den 01.12.2004, 16:46 +1100 schrieb Russell Smith: > Regarding the "Natural Order" of columns. > > Why if we can delete a column from the middle of a table now, change the type > of that column to something totally different, eg text -> int. > Can we not move the order of the ro

Re: [GENERAL] Using default tablespace for database?

2004-11-30 Thread Tom Lane
"Guy Rouillier" <[EMAIL PROTECTED]> writes: > ... This does seem > logically inconsistent, though. That I can create a table in the > database's default tablespace if I don't specify it demonstrates that I > have permission to do; this permission has been implicitly granted to > all users of the d

Re: [GENERAL] change natural column order

2004-11-30 Thread Russell Smith
Regarding the "Natural Order" of columns. Why if we can delete a column from the middle of a table now, change the type of that column to something totally different, eg text -> int. Can we not move the order of the rows around, and when the new row is written to disk in the new arrangement. Or

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Jan Wieck
On 11/30/2004 5:27 PM, Mike Cox wrote: Ultimately, the RFD is about providing a place for _Usenet_ PostgreSQL users who have been neglected for quite some time. With the ease of posting to the big 8 group, and the very large propegation, I can see why the comp.databases.postgresql group will be ve

[GENERAL] granting privileges

2004-11-30 Thread Nageshwar Rao
How to grant privileges to all objects( tables,sequences etc) in specific schema, I mean I want to give users select,insert,delete and update to all objects in the schema in one sql statement.I know   Grant select,insert,update,delete on table_name to user_name.  But this is for individu

Re: [GENERAL] createlang fails w/ 'undef ref to

2004-11-30 Thread OpenMacNews
Maybe you didn't restart your beta4-or-older postmaster after updating? SPI_restore_connection definitely exists in the beta5 sources ... all ok now. restarting wasn't doing the trick ... same errors. still able to access/read/write to my db's but nada else. but, looking in my logs i noted a slew

Re: [GENERAL] Using default tablespace for database?

2004-11-30 Thread Guy Rouillier
Tom Lane wrote: > > The presumption is that there should be no direct permission checks > on the default tablespace for a database --- if a user has the > ability to create tables in a database at all, then he's got the > right to create 'em in the database's default tablespace. To do > otherwise

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Tom Lane
[EMAIL PROTECTED] writes: > On 30 Nov 2004 22:55:00 GMT, Woodchuck Bill <[EMAIL PROTECTED]> > wrote: >> Trying to sway the vote? > There has been no CFV. During an RFD, he's completely entitled to try > to persuade others people to vote yes or no when the time comes. Both of you are under the il

[GENERAL] pgEdit 1.0b4

2004-11-30 Thread John DeSoi
The next beta version of pgEdit is available for evaluation. This version includes a new tab completion feature based on the implementation in psql. In addition, there are 14 other completion commands where you can request a specific type of completion (e.g. table, column, function). As with al

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Jan Wieck
On 11/30/2004 5:55 PM, Woodchuck Bill wrote: Marc G. Fournier From: <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: [EMAIL PROTECTED] (Bill Harris) writes: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: "If there was an official newsgroup for postgresql, would you switch to using Usenet fro

Re: [GENERAL] change natural column order

2004-11-30 Thread Greg Stark
"Dann Corbit" <[EMAIL PROTECTED]> writes: > Putting "SELECT * FROM " into a compiled program using libpq or > ESQL is a code defect. Period. > > ALTER TABLE ADD COLUMN /* Most frequent defect maker for SELECT * */ Whatever are you talking about? I've never tried ESQL precisely because it

Re: [GENERAL] Upcoming Changes to News Server ...

2004-11-30 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > Oh my, > after reading this he really caught my attention. You have to google for > "Gary Burnore" a little. This guy has a record ... gburnore was known far and wide as a net.asshole when I dropped out of Usenet, lo these many years ago. Doesn't look lik

Re: [GENERAL] createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6

2004-11-30 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: > i _think_ i'm up to date ... Maybe you didn't restart your beta4-or-older postmaster after updating? SPI_restore_connection definitely exists in the beta5 sources ... regards, tom lane ---(end of broadcast)

Re: [GENERAL] Upcoming Changes to News Server ...

2004-11-30 Thread Marc G. Fournier
On Tue, 30 Nov 2004, Jan Wieck wrote: On 11/30/2004 2:37 PM, Gary L. Burnore wrote: Perhaps I wasn't clear. I don't care WHO you are. I've already asked you once to stay out of my email. Further emails from you will be reported to both Yahoo and Comcast as harassment. I'm not on your list.

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Mike Cox
Woodchuck Bill wrote: >> ppl like PeterE, TomL, JoshuaD, etc ... the thread can be seen: >> >> http://archives.postgresql.org/pgsql-hackers/2004-11/msg01110.php > > Trying to sway the vote? > > Well, you have to admit that for _developers_, email is probably better. But remember develop

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Woodchuck Bill
Marc G. Fournier From: <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > [EMAIL PROTECTED] (Bill Harris) writes: > >>"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > >>> "If there was an official newsgroup for postgresql, would you switch >>> to using Usenet from using the mailing lists?"

Re: [GENERAL] createlang fails w/ 'undef ref to

2004-11-30 Thread OpenMacNews
hi tom, thx for the reply =) You seem to be trying to load a current plpgsql.so into a less than current backend. SPI_restore_connection() was just added a few days ago ... just getting used to pgsql terminology, but i presume by 'backend' you simply mean version of pgsql iteslf, yes? to that en

[GENERAL] Trigger problem 2

2004-11-30 Thread Jamie Deppeler
Hi Finally getting this trigger ro work have one last problem, im trying to use Trigger variables sample code UPDATE wip.resource set "name" = datarecord.borname where wip.resource."primary" = OLD."primary"; get the following error Error: record "old" is not yet assigned would be grea

Re: [GENERAL] Upcoming Changes to News Server ...

2004-11-30 Thread Jan Wieck
On 11/30/2004 2:37 PM, Gary L. Burnore wrote: Perhaps I wasn't clear. I don't care WHO you are. I've already asked you once to stay out of my email. Further emails from you will be reported to both Yahoo and Comcast as harassment. I'm not on your list. _I_ am posting to a USENet discussion

Re: [GENERAL] createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6

2004-11-30 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: > createlang: language installation failed: ERROR: could not load library > "/usr/local/pgsql/lib/plpgsql.so": dyld: /usr/local/pgsql/bin/postmaster > Undefined symbols: > /usr/local/pgsql/lib/plpgsql.so undefined reference to > _SPI_rest

Re: [GENERAL] Using default tablespace for database?

2004-11-30 Thread Tom Lane
"Guy Rouillier" <[EMAIL PROTECTED]> writes: > (1) create table t1 (f1 smallint) tablespace ts- fails - should it? Sure. You didn't grant any permissions on tablespace ts. > (2) create table t1 (f1 smallint) - succeeds The presumption is that there should be no direct permission checks o

Re: [GENERAL] Newbie question: returning rowtypes from a plpgsql function

2004-11-30 Thread Tom Lane
Larry White <[EMAIL PROTECTED]> writes: > I wrote a function that returns a rowtype. The rowtype is assigned a > value by a query using SELECT INTO. The query sometimes will return > no rows. When it does, the function's return value is a row with no > values. > I would have expected it to retu

[GENERAL] createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6

2004-11-30 Thread OpenMacNews
hi all, i've a successful install of pgsql 8b5 on OSX 10.3.6. trying to install pl/pgsql: % createlang plpgsql template1 results in an immediate error: createlang: language installation failed: ERROR: could not load library "/usr/local/pgsql/lib/plpgsql.so": dyld: /usr/local/pgsql/bin/post

Re: [GENERAL] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Woodchuck Bill
[EMAIL PROTECTED] (Joel) wrote in news:[EMAIL PROTECTED]: (crosspost added to news.groups) > As long as the web page maintainers are going to the trouble of taking a > survey, might I (at the risk of being tarred and feathered :-p) suggest > a more thorough survey? > > Suggested questions: > >

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Woodchuck Bill
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: >>Trying to sway the vote? > > There has been no CFV. During an RFD, he's completely entitled to try > to persuade others people to vote yes or no when the time comes. I didn't say that he was not entitled. > Bill, is it possible for you to dr

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Woodchuck Bill
Marc G. Fournier From: <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > [EMAIL PROTECTED] writes: > >>On 30 Nov 2004 22:55:00 GMT, Woodchuck Bill <[EMAIL PROTECTED]> >>wrote: > >>>Marc G. Fournier From: <[EMAIL PROTECTED]> wrote in >>>news:[EMAIL PROTECTED]: >>> Just as an FYI ... t

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] writes: >On 30 Nov 2004 22:55:00 GMT, Woodchuck Bill <[EMAIL PROTECTED]> >wrote: >>Marc G. Fournier From: <[EMAIL PROTECTED]> wrote in >>news:[EMAIL PROTECTED]: >> >>> Just as an FYI ... the latest RFD is for *one* >>> comp.databases.postgresql group to be created, that is not-

[GENERAL] Using default tablespace for database?

2004-11-30 Thread Guy Rouillier
I've searched the archives on this subject - appreciate some clarification on tablespaces defined during create database. Using 8.0beta5 on Linux, I've revoked permission to use default tablespaces and created a new default tablespace for a new database with the following: revoke create on schema

[GENERAL] Newbie question: returning rowtypes from a plpgsql function

2004-11-30 Thread Larry White
I wrote a function that returns a rowtype. The rowtype is assigned a value by a query using SELECT INTO. The query sometimes will return no rows. When it does, the function's return value is a row with no values. I would have expected it to return 0 rows, like the query itself. Am I doing some

Re: [GENERAL] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Joel
As long as the web page maintainers are going to the trouble of taking a (Bsurvey, might I (at the risk of being tarred and feathered :-p) suggest (Ba more thorough survey? (B (BSuggested questions: (B (B(1) If there were a USENET newsfeed, under comp.databases.postgresql.*, (Bof one or more

Re: [GENERAL] change natural column order

2004-11-30 Thread gnari
From: "Dann Corbit" <[EMAIL PROTECTED]> > From: "Steve Atkins" <[EMAIL PROTECTED]> > > > > Would you care to expand on why you think this... > > > > my $row = $dbh->selectrow_hashref("select * from $table"); > > print 'foo = ', $row{'foo'}; > > > > ...is inherently a a code defect? > Ther

Re: [GENERAL] change natural column order

2004-11-30 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of gnari Sent: Tuesday, November 30, 2004 4:48 PM To: [EMAIL PROTECTED] Subject: Re: [GENERAL] change natural column order From: "Steve Atkins" <[EMAIL PROTECTED]> > > Would you care to expand on why you thin

Re: [GENERAL] Trigger Problems

2004-11-30 Thread gnari
From: "Jamie Deppeler" <[EMAIL PROTECTED]> > Hi , i have designed a trigger function called test2(Integer) the trigger function must be declared without arguments http://scripts.postgresql.org/docs/7.4/static/triggers.html#TRIGGER-DEFINITI ON gnari ---(end of broad

Re: [GENERAL] change natural column order

2004-11-30 Thread gnari
From: "Steve Atkins" <[EMAIL PROTECTED]> > > Would you care to expand on why you think this... > > my $row = $dbh->selectrow_hashref("select * from $table"); > print 'foo = ', $row{'foo'}; > > ...is inherently a a code defect? because it does not work ? (you mean $row->{'foo'}) sorry, coul

Re: [GENERAL] Trigger Problems

2004-11-30 Thread Jim C. Nasby
That is probably because you created test2(INTEGER) and you're trying to call test2(TEXT). On Wed, Dec 01, 2004 at 11:22:41AM +1100, Jamie Deppeler wrote: > Hi , i have designed a trigger function called test2(Integer) > > im trying to use it with a trigger but get errors that function cannot >

[GENERAL] Trigger Problems

2004-11-30 Thread Jamie Deppeler
Hi , i have designed a trigger function called test2(Integer) im trying to use it with a trigger but get errors that function cannot be found Trigger statement is CREATE TRIGGER "new_trigger566" BEFORE INSERT ON "customer" FOR EACH ROW EXECUTE PROCEDURE test2("primary"); get the error test2() can

Re: [GENERAL] change natural column order

2004-11-30 Thread Steve Atkins
On Tue, Nov 30, 2004 at 03:03:37PM -0800, Dann Corbit wrote: > Using "SELECT * FROM " from the PSQL prompt or any other > interactive tool is perfectly fine. > > Putting "SELECT * FROM " into a compiled program using libpq or > ESQL is a code defect. Period. This looks like misinformation, a

Re: [GENERAL] Postgres Design

2004-11-30 Thread Jim C. Nasby
Speaking in a general sense, it's almost never a good idea to split something across databases by an arbitrary boundary such as year. It's also not a good idea to split things into multiple databases across logical boundaries unless there's a compelling reason to do so. On Tue, Nov 30, 2004 at 02:

Re: [GENERAL] change natural column order

2004-11-30 Thread Dann Corbit
Using "SELECT * FROM " from the PSQL prompt or any other interactive tool is perfectly fine. Putting "SELECT * FROM " into a compiled program using libpq or ESQL is a code defect. Period. ALTER TABLE ADD COLUMN /* Most frequent defect maker for SELECT * */ ALTER TABLE DROP COL

Re: [GENERAL] change natural column order

2004-11-30 Thread Pierre-Frédéric Caillaud
> SELECT * is almost always bad style. It shouldnt be so hard to This is another religious issue you'll find people pretty adamant on both sides. Seems so. I tend to prefer to use "SELECT *" because it reduces repetition and improves modularity. There are fewer places in the code that need t

Re: [GENERAL] Postgres Design

2004-11-30 Thread Michael Fuhr
On Tue, Nov 30, 2004 at 02:27:32PM -0500, Morris N. Grajower wrote: > I have hundreds of different survey files in a customized database. > I would like to convert them to postgres. > My question is should I create one database for all the surveys or > should I limit the number of surveys to a da

Re: [GENERAL] Dropping sequences

2004-11-30 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > I have changed the default sequence on a primary key integer (created as > SERIAL) field in a table, but it will not let me drop the old sequence > and continues to tell me that the sequence is required by the table. Can > someone tell me what is req

Re: [GENERAL] VACUUM and ANALYZE Follow-Up

2004-11-30 Thread Tom Lane
"Mark Dexter" <[EMAIL PROTECTED]> writes: > 1. Would it be difficult to add an option to ANALYZE to force it to > pretend that there are a minimum number of rows (e.g., ANALYZE MINIMUM > 1000 or something)? This would appear to be a simple-minded way to > solve the problem without any concerns abo

[GENERAL] Ignore this ...

2004-11-30 Thread Marc G. Fournier
Just making sure that the new amavisd with spamassassin 3.x isn't causing a problem ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664 ---(end of broadcast)-

Re: [GENERAL] change natural column order

2004-11-30 Thread Greg Stark
Pierre-Frédéric Caillaud <[EMAIL PROTECTED]> writes: > > SELECT * is almost always bad style. It shouldnt be so hard to > > Why ? > > Many languages, including PHP, have associative arrays, so you should > just use array[column_name] instead of array[column_number]. This is what I

[GENERAL] Postgres Design

2004-11-30 Thread Morris N. Grajower
I have hundreds of different survey files in a customized database. I would like to convert them to postgres. My question is should I create one database for all the surveys or should I limit the number of surveys to a database. for example create a different database for each survey year, or by

Re: [GENERAL] Maximum limit on int in plpgsql

2004-11-30 Thread Steve Atkins
On Tue, Nov 30, 2004 at 11:18:44AM +, Richard Huxton wrote: > [EMAIL PROTECTED] wrote: > >The i am taking the sum using this formula > > > >out_sum=ip1*256*256*256+ip2*256*256+ip3*256+ip4; > > > >When i run the procedure i am getting following error > >pg_atoi : Numerical result out of range >

[GENERAL] Dropping sequences

2004-11-30 Thread Robert Fitzpatrick
I have changed the default sequence on a primary key integer (created as SERIAL) field in a table, but it will not let me drop the old sequence and continues to tell me that the sequence is required by the table. Can someone tell me what is required to get this dropped? I am just paranoid that it c

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Net Virtual Mailing Lists
For what its worth, I vote no. I like the mailing lists. If having a newsgroup is beneficial, I say go ahead and start one, but don't mess around with the mailing lists, please. I really like the one or two digests I get in my mailbox everyday. - Greg ---(end of broadc

Re: [GENERAL] VACUUM and ANALYZE Follow-Up

2004-11-30 Thread Mark Dexter
Title: Re: [GENERAL] VACUUM and ANALYZE Follow-Up Tom, I did read through the links you provided.  Unfortunately, I don't feel qualified to judge the technical merits of the possible solutions.  Since you appear to be well informed on this issue, can I ask you a couple of quick questions? 1.

Re: [GENERAL] starting the database server

2004-11-30 Thread Karsten Hilbert
> 30/11/200416:45:08PostgreSQL Error None0 N/A > BAAN-AT-HOMEexecution of PostgreSQL by a user with administrative > permissions is not permitted. > The server must be started under an unprivileged user ID to prevent > possible system security compromise. See

Re: [GENERAL] starting the database server

2004-11-30 Thread Richard Huxton
Nefnifi, Kasem wrote: Hello, but it has worked fine since the installation without any error until now and nothing has been changed in the system policy. how it can something like this happened. Something must have changed. If it's not your installation of PostgreSQL then it's something in the aut

Re: [GENERAL] starting the database server

2004-11-30 Thread Nefnifi, Kasem
Hello, but it has worked fine since the installation without any error until now and nothing has been changed in the system policy. how it can something like this happened. now the concrete solution, I've to follow the solution proposed in the log file. which user should I use to start the databa

[GENERAL] installing postgresql .rpms not in /usr/bin

2004-11-30 Thread Mark
Hi, Is there any reason why postgresql rpms (FC2) are not relocatable? The reason I ask I need to have 2 postgresql instances installed on machine with no C compiler. I'like installed in diferent driectory and not in /usr/bin... I'd rather not to start renaming files :( I know that I can set up

Re: [GENERAL] delete with index scan

2004-11-30 Thread Sally Ruggero
Thank you so much, I guess my sql skills need sharpening. I have been trying all night to find out how to do a join with delete. I thought I needed to mention t2 in the from clause, but that didn't work. This worked great. Sally - Original Message - From: "Martijn van Oosterhout" <[EMAIL

[GENERAL] proper use of temp table in function

2004-11-30 Thread David Gagnon
Hi all, Sorry to ask since I'm pretty sure this kind of question have been asked again an again. But I searched and haven't found my answer. So here is the question, please help :-) In plpgsql function how do you deal with temporary table. I need do a bunch of data manipulations in my functi

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] (Bill Harris) writes: >"Marc G. Fournier" <[EMAIL PROTECTED]> writes: >> "If there was an official newsgroup for postgresql, would you switch >> to using Usenet from using the mailing lists?" >> As a side note, for those that do vote 'yes', please note that there >> is an offic

Re: [GENERAL] starting the database server

2004-11-30 Thread Richard Huxton
Nefnifi, Kasem wrote: Hi Richard, bellow the text from the log file: -- start log file -- 30/11/2004 16:45:08PostgreSQL Error None0 N/A BAAN-AT-HOME execution of PostgreSQL by a user with administrative permissions is not permitted. The server must

Re: [GENERAL] Temporal query question

2004-11-30 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > SELECT now() - (1 || ' days')::interval; Note that the preferred form is SELECT now() - (n * '1 day'::interval); if n is a numeric variable. When you write SELECT now() - (n || ' days')::interval; you are relying on the following: (

Re: [GENERAL] change natural column order

2004-11-30 Thread Mage
Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: I think you'll find you're out of luck. IIRC there was some discussion on the hackers list regarding a mapping layer that would let you re-order columns. I think the decision was "too much work for too small a gain". Yup, that wa

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Max
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Bill Harris > Sent: Monday, November 29, 2004 9:50 PM > To: Marc G. Fournier > Cc: [EMAIL PROTECTED] > Subject: Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ... > > > "Marc G. Fournier"

Re: [GENERAL] change natural column order

2004-11-30 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > I think you'll find you're out of luck. IIRC there was some discussion > on the hackers list regarding a mapping layer that would let you > re-order columns. I think the decision was "too much work for too small > a gain". Yup, that was exactly the c

Re: [GENERAL] VACUUM and ANALYZE Follow-Up

2004-11-30 Thread Pierre-Frédéric Caillaud
Hasn't anybody read the other threads I posted links to? (That's a rhetorical question, because the answer clearly is "no" :-() You mean this one : http://archives.postgresql.org/pgsql-hackers/2004-11/msg00985.php In which you write : rel->pages = RelationGetNumberOfBlocks(relation); if

Re: [GENERAL] starting the database server

2004-11-30 Thread Nefnifi, Kasem
Hi Richard, bellow the text from the log file: -- start log file -- 30/11/2004 16:45:08PostgreSQL Error None0 N/A BAAN-AT-HOMEexecution of PostgreSQL by a user with administrative permissions is not permitted. The server must be started unde

Re: [GENERAL] change natural column order

2004-11-30 Thread Pierre-Frédéric Caillaud
SELECT * is almost always bad style. It shouldnt be so hard to Why ? Many languages, including PHP, have associative arrays, so you should just use array[column_name] instead of array[column_number]. This is what I do, all the time. For instance, in Python : * The wrong w

Re: [GENERAL] delete with index scan

2004-11-30 Thread Martijn van Oosterhout
Have you considered a join? delete from t1 where pkey = t2.pkey; Also, it appears you never ANALYZEd t2, maybe that would help? On Tue, Nov 30, 2004 at 04:55:58AM -0500, [EMAIL PROTECTED] wrote: > I have a table t1 with a primary key column pkey, and a table t2, with a > primary key column pkey

Re: [GENERAL] Upcoming Changes to News Server ...

2004-11-30 Thread Jan Wieck
On 11/29/2004 11:53 PM, Gary L. Burnore wrote: Stay out of my email. This ia a PostgreSQL related topic discussed on PostgreSQL mailing lists and you react like this to a mail from a PostgreSQL CORE team member? Rethink your attitude. Jan At 11:50 PM 11/29/2004, you wrote: On 11/23/2004 4:46 PM

Re: [GENERAL] change natural column order

2004-11-30 Thread Joolz
Daniel Martini zei: > Hi, > > Joolz, you already got quite a few answers, that the frontend is > probably > not properly designed, if it relies on a certain column ordering. I > agree Hi Daniel, Well, I made the frontend myself, so... :) There is a reason that I made it this way, I have a datab

[GENERAL] delete with index scan

2004-11-30 Thread sar
I have a table t1 with a primary key column pkey, and a table t2, with a primary key column pkey. Is there a way to make the following delete use the indexes? delete from t1 where pkey in (select pkey from t2); NOTICE: QUERY PLAN: Seq Scan on t1 (cost=0.00..6616238.99 rows=660239 width=6) S

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Bill Harris
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > "If there was an official newsgroup for postgresql, would you switch > to using Usenet from using the mailing lists?" > As a side note, for those that do vote 'yes', please note that there > is an official pgsql.* hierarchy gated from the mailing l

Re: [GENERAL] change natural column order

2004-11-30 Thread Mage
Tino Wildenhain wrote: Hi, Am Dienstag, den 30.11.2004, 10:26 +0100 schrieb Joolz: is it possible to change the natural order of the columns afterwards? The reason I need this is because the frontend picks up table columns in natural order, looks at the datatype and creates view, input and mutat

Re: [GENERAL] change natural column order

2004-11-30 Thread Daniel Martini
Hi, Joolz, you already got quite a few answers, that the frontend is probably not properly designed, if it relies on a certain column ordering. I agree completely with that. However your question got me curious, and I've digged around a bit in the system tables. You might be interested in my findi

Re: [GENERAL] starting the database server

2004-11-30 Thread Richard Huxton
Nefnifi, Kasem wrote: thanks Richard for the reaction, bellow a print screen of the error that I get when I try to start the service from windows services control panel: ole0.bmp Try and stick to cutting and pasting text rather than embedding images - lots of people on the lists will be reading/p

Re: [GENERAL] [ANNOUNCE] USENET vs Mailing Lists Poll ...

2004-11-30 Thread Marc G. Fournier
On Mon, 29 Nov 2004, Bill Harris wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: "If there was an official newsgroup for postgresql, would you switch to using Usenet from using the mailing lists?" As a side note, for those that do vote 'yes', please note that there is an official pgsql.* hie

Re: [GENERAL] change natural column order

2004-11-30 Thread Joolz
Richard Huxton zei: > Joolz wrote: >> >>>I dont think the overhead in implementing such a rarely needed >>>feature isnt worth it. We need a lot more other things ;-) >> >> >> I agree. Only I think this wouldn't require new functionality, I >> have a gut feeling that this is possible as it is. Now o

Re: [GENERAL] starting the database server

2004-11-30 Thread Richard Huxton
Nefnifi, Kasem wrote: when trying to start it via the services of windows, get an internal error that error in windows or in the service... What error? What do your system logs say? -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: do

Re: [GENERAL] Maximum limit on int in plpgsql

2004-11-30 Thread Richard Huxton
[EMAIL PROTECTED] wrote: I have tried using the int8 also, even then i am having the problem. Please CC the list. The following works for me. I suspect your equivalent of "i" is an int4. CREATE OR REPLACE FUNCTION test_int8(text) RETURNS int8 AS ' DECLARE i int8; tot int8; BEGIN i := CAST

[GENERAL] starting the database server

2004-11-30 Thread Nefnifi, Kasem
Hello,   I'm using a windows 2000 advanced server, postgresql was installed and working fine, and I'm using pgadminIII. the database server cannot start and get error "is the postmaster running with -i on localhost 127.0.0.1 and accepting tcp/ip connection on the port 5432"   the last ti

Re: [GENERAL] Maximum limit on int in plpgsql

2004-11-30 Thread Richard Huxton
[EMAIL PROTECTED] wrote: The i am taking the sum using this formula out_sum=ip1*256*256*256+ip2*256*256+ip3*256+ip4; When i run the procedure i am getting following error pg_atoi : Numerical result out of range I tried all possible datatypes but still i am getting the same error. Is it the problem

Re: [GENERAL] Temporal query question

2004-11-30 Thread Richard Huxton
Stefano Bonnin wrote: Hi all, I have a "simple" question about the following temporal query with "interval" operator: can I define a query of this type? select myfield,numeric_field from mytable where temporal_attribute < temporal_attribute - interval numeric_field || ' days' obviously this syntax

Re: [GENERAL] change natural column order

2004-11-30 Thread Richard Huxton
Joolz wrote: I dont think the overhead in implementing such a rarely needed feature isnt worth it. We need a lot more other things ;-) I agree. Only I think this wouldn't require new functionality, I have a gut feeling that this is possible as it is. Now only find out how :) I think you'll find y

Re: [GENERAL] Temporal query question

2004-11-30 Thread Martijn van Oosterhout
The usual syntax is something like: select myfield,numeric_field from mytable where temporal_attribute_a < temporal_attribute_b - ( numeric_field * '1 day'::interval); One of the temporal_attributes tends to be 'now' or 'today' but the principle is the same... On Tue, Nov 30, 2004 at 11:30:16

Re: [GENERAL] Maximum limit on int in plpgsql

2004-11-30 Thread Tino Wildenhain
Hi, Am Dienstag, den 30.11.2004, 02:29 -0800 schrieb [EMAIL PROTECTED]: > Hello, > > I am passing the ip address as a varchar. Eg: 133.9.4.11 > > Later on i am splitting the ip address with the delimiter as '.' > > > ip1t:= split_part($1,'.',1); // returns a text value > ip2t:= split_part($1,'

Re: [GENERAL] change natural column order

2004-11-30 Thread Tino Wildenhain
Hi, Am Dienstag, den 30.11.2004, 11:31 +0100 schrieb Joolz: ... > > If you want to have a given ordering, why not just specify your > > column names in that order in your statements? Or just refer to > > them by column name if your host language allows it. > > The frondend functions are made so t

Re: [GENERAL] change natural column order

2004-11-30 Thread Joolz
Tino Wildenhain zei: > Hi, > > Am Dienstag, den 30.11.2004, 10:26 +0100 schrieb Joolz: >> Hello everyone, >> >> When I create a table and later on (say, because customers want to >> store extra info) add a column, like this: >> >> create table test (lastfield varchar); >> alter table test add c

[GENERAL] Maximum limit on int in plpgsql

2004-11-30 Thread deepthi
Hello, I am passing the ip address as a varchar. Eg: 133.9.4.11 Later on i am splitting the ip address with the delimiter as '.' ip1t:= split_part($1,'.',1); // returns a text value ip2t:= split_part($1,'.',2); // returns a text value ip3t:= split_part($1,'.',3); ip4t:= split_part($1,'.',4); T

[GENERAL] Temporal query question

2004-11-30 Thread Stefano Bonnin
Hi all,   I have a "simple" question about the following temporal query with "interval" operator:   can I define a query of this type?   select myfield,numeric_field from mytable where temporal_attribute < temporal_attribute - interval numeric_field || ' days'   obviously this syntax is wrong

Re: [GENERAL] change natural column order

2004-11-30 Thread Tino Wildenhain
Hi, Am Dienstag, den 30.11.2004, 10:26 +0100 schrieb Joolz: > Hello everyone, > > When I create a table and later on (say, because customers want to > store extra info) add a column, like this: > > create table test (lastfield varchar); > alter table test add column firstfield varchar; > >

Re: [GENERAL] Inheritance in Postgres ?

2004-11-30 Thread Richard Huxton
Tatu Salminen wrote: Hi, Is there going to be full support for inheritance (tables) in future ? Are there going to be any improvements about inheritance ? It all depends on whether anyone with the relevant interest and skills steps forward to develop improvements. At present it seems low on th

[GENERAL] change natural column order

2004-11-30 Thread Joolz
Hello everyone, When I create a table and later on (say, because customers want to store extra info) add a column, like this: create table test (lastfield varchar); alter table test add column firstfield varchar; is it possible to change the natural order of the columns afterwards? The reaso