[HACKERS] [GENERAL] Off-topic: usenet sources?

2001-02-06 Thread Ed Loehr
Reliable rumor has it that Deja.com (formerly Dejanews) is going out of business, possibly as early as this week, and pulling the plug completely (I worked there '97-'99). They've already laid off all but a small handful of the peak of ~125 employees. That was the premier source for technical ar

Re: [HACKERS] Auto-indexing

2001-02-06 Thread Bruce Momjian
> Probably both, but if it's done there should be options to: > > .) disable it completely or by table/database or even threshold or >disk free parameters (indicies can be large) > .) log any auto-created databases to inform the DBA. > .) if disabled optionally log when it would have created

Re: [HACKERS] Auto-indexing

2001-02-06 Thread Alfred Perlstein
* Christopher Kings-Lynne <[EMAIL PROTECTED]> [010206 18:29] wrote: > Is it a feasible idea that PostgreSQL could detect when an index would be > handy, and create it itself, or at least log that a table is being queried > but the indices are not appropriate? > > I suggest this as it's a feature

[HACKERS] Auto-indexing

2001-02-06 Thread Christopher Kings-Lynne
Is it a feasible idea that PostgreSQL could detect when an index would be handy, and create it itself, or at least log that a table is being queried but the indices are not appropriate? I suggest this as it's a feature of most windows databases, and MySQL does it. I think it would be a great tim

Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-06 Thread Tatsuo Ishii
> The man page suggests that nohup is required to init postmaster, I > know this isn't true but to implement an example init file and not > match up with the man page seemed foolish. > > I guess nohup would stop postmaster doing something awfull if it > doesn't handle HUP properly but I very much

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Tom Lane
Lamar Owen <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> What would make more sense is for the standard install to install only >> those headers needed for *client side* programming, and then to have >> an optional install target that installs the whole darn src/include >> tree. > I can go for

Re: [HACKERS] Duplicate OIDs in pg_attribute

2001-02-06 Thread Bruce Momjian
> Good catch, Joe! This bug has probably been there since the beginning > of time. It's evidently got no serious consequences (since in reality, > OID uniqueness is not assumed for this table), but it ought to be fixed. > A quick-hack solution would be to zero out the tuple's OID before each > h

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Tom Lane
"Ross J. Reedstrom" <[EMAIL PROTECTED]> writes: > Seems it's a non-portable behavior: Not at all. The code is asking strncpy to copy n bytes, where n is known to be <= strlen of the source string. Every spec-conforming implementation of strncpy will copy n bytes, no more, no less, and will *not

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Bruce Momjian
> I agree with Karel on this --- it's difficult to visualize doing useful > SPI work without a source tree at hand, and it also seems unlikely that > SPI authors would get along for long with *only* those header files > needed to pull in spi.h. So I think it's pretty pointless to add just > those

Re: [HACKERS] Duplicate OIDs in pg_attribute

2001-02-06 Thread Tom Lane
Joe Mitchell <[EMAIL PROTECTED]> writes: > I noticed that pg_attribute has rows with the same OID! Joe previously asked me about this off-list, and I replied thus: This appears to be due to the incredibly grotty coding used in AppendAttributeTuples in src/backend/catalog/index.c --- rather than

Re: [HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Tom Lane
Florent Guillaume <[EMAIL PROTECTED]> writes: > On this same subject, the plpgsql doc says to use > SELECT expression INTO var FROM ... > but Bruce's book, in several examples ("PL/PGSQL Functions" for instance, > node203.html) uses > SELECT INTO var expression FROM ... > Both should w

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Ross J. Reedstrom
On Tue, Feb 06, 2001 at 06:17:46PM -0600, Ross J. Reedstrom wrote: > > Seems it's a non-portable behavior: > > The strncpy() function is similar, except that not more >than n bytes of src are copied. Thus, if there is no null >byte among the first n bytes of src, the re

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Lamar Owen
Tom Lane wrote: > I agree with Karel on this --- it's difficult to visualize doing useful > SPI work without a source tree at hand, and it also seems unlikely that > SPI authors would get along for long with *only* those header files > needed to pull in spi.h. So I think it's pretty pointless to

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Tom Lane
Lamar Owen <[EMAIL PROTECTED]> writes: > Karel Zak wrote: >> I expect header files on /usr/include/pgsql for client programming not >> for SPI. > Why? I know of several people doing SPI work with no source tree > installed. I agree with Karel on this --- it's difficult to visualize doing usefu

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Ross J. Reedstrom
On Tue, Feb 06, 2001 at 07:08:20PM -0500, Tom Lane wrote: > [EMAIL PROTECTED] (Nathan Myers) writes: > > Thus, the original code is OK, except probably the literal "23" > > in place of what should be a meaningful symbolic constant, or > > (at least!) sizeof(buf) - 1. > > No, the original code is

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Tom Lane
[EMAIL PROTECTED] (Nathan Myers) writes: > Thus, the original code is OK, except probably the literal "23" > in place of what should be a meaningful symbolic constant, or > (at least!) sizeof(buf) - 1. No, the original code is NOT ok. Read the man page again. As the code stood, the only null th

[HACKERS] a contrib function to query current locale values

2001-02-06 Thread Hannu Krosing
Hi, I've written a small function that should go into contrib for 7.1 As locale issues are quite tricky, being able to find out what locale backend thinks it is in is a good thing ;) from my README.getlocale: getlocale('category') - return the locale setting of the backe

Re: [HACKERS] psql: why not pset PROMPT[0-2] ?

2001-02-06 Thread Peter Eisentraut
Because pset sets parameters of the table output. Prompts have nothing to do with table output. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/

[HACKERS] psql: why not pset PROMPT[0-2] ?

2001-02-06 Thread Michal Maru¹ka
(In psql:) I need to modify the 2nd prompt. So i looked at the sources: I leave the validity test (of the name of the option/param) to SetVariable !! Here is the patch: diff -c /internet/cvs/pgsql/src/bin/psql/command.c.~1~ /internet/cvs/pgsql/src/bin/psql/command.c *** /internet/cvs/pgsql/s

Re: [HACKERS] Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

2001-02-06 Thread Bruce Momjian
> > > > su - postgres sh -c "$DAEMON stop >& /dev/null" > > > > > > Hmm... What is wrong here, besides the '>&'? The '>&' can be > > > replaced with '2>&1 >' if that is more standard. > > It won't do what you want. You want '>/dev/null 2>&1'. Yes, I knew he wanted >/dev/null 2>&1. I just fix

[HACKERS] Re: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Florent Guillaume
> > SQL = ''SELECT * INTO temp1 FROM '' || $1; > > I tried this, and it seems that "SELECT ... INTO foo" is not executed > correctly by EXECUTE --- the INTO is handled as an ordinary select-into- > table construct rather than plpgsql's select-into-variable. > > While I have not looked closel

[HACKERS] Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....

2001-02-06 Thread Florent Guillaume
> > > su - postgres sh -c "$DAEMON stop >& /dev/null" > > > > Hmm... What is wrong here, besides the '>&'? The '>&' can be > > replaced with '2>&1 >' if that is more standard. It won't do what you want. You want '>/dev/null 2>&1'. > Change made. Hmmm, I don't see this change in cvsweb. F

[HACKERS] Duplicate OIDs in pg_attribute

2001-02-06 Thread Joe Mitchell
  I noticed that pg_attribute has rows with the same OID!  You can verify this by running. # select count(oid),oid from pg_attribute group by oid having count(oid) > 1; We see that these duplicate OIDs appear to happen when pg_attibute rows are inserted for indexes and primary keys. select relnam

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Karel Zak
On Tue, 6 Feb 2001, Lamar Owen wrote: > Karel Zak wrote: > > On Tue, 6 Feb 2001, Oliver Elphick wrote: > > > Certain include files are installed by src/include/Makefile and by > > > interfaces/libpq++/Makefile. However, they in turn include others that > > > are not installed, thus obviating th

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Lamar Owen
Karel Zak wrote: > On Tue, 6 Feb 2001, Oliver Elphick wrote: > > Certain include files are installed by src/include/Makefile and by > > interfaces/libpq++/Makefile. However, they in turn include others that > > are not installed, thus obviating the usefulness of the ones that are. > In your mo

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Lamar Owen
Oliver Elphick wrote: > Certain include files are installed by src/include/Makefile and by > interfaces/libpq++/Makefile. However, they in turn include others that > are not installed, thus obviating the usefulness of the ones that are. > The missing files are these: [snip] > The list can be r

Re: [HACKERS] using the same connection?

2001-02-06 Thread Mathieu Dube
Well actually this particular connection is just for selects... On Tue, 06 Feb 2001, you wrote: > On Tue, Feb 06, 2001 at 11:08:49AM -0500, Mathieu Dube wrote: > > Hi y'all, > > Is it a bad idea for an app to keep just a couple of connections to a > > database, put semaphore/mutex on them and

Re: [HACKERS] using the same connection?

2001-02-06 Thread Nathan Myers
On Tue, Feb 06, 2001 at 11:08:49AM -0500, Mathieu Dube wrote: > Hi y'all, > Is it a bad idea for an app to keep just a couple of connections to a > database, put semaphore/mutex on them and reuse them all through the program? > Of course I would check if their PQstatus isnt at CONNECTI

[HACKERS] Re: 25 March 2001 bug

2001-02-06 Thread Karel Zak
On Tue, 6 Feb 2001, Guest User wrote: > Apologies if this is the wrong place to send a question Please use, hackers (or other PG) list. More heads more know, more eyes more view :-) > Do you know if there is a patch for this bug and if so where I might be > able to find it? I think I'm usi

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Nathan Myers
On Tue, Feb 06, 2001 at 01:21:00PM -0500, Bruce Momjian wrote: > > > *** fe-exec.c 2001/01/24 19:43:30 1.98 > > > --- fe-exec.c 2001/02/06 02:02:27 1.100 > > > *** > > > *** 2035,2041 > > > if (len > 23) > > > len = 23; > > > s

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Ross J. Reedstrom
On Tue, Feb 06, 2001 at 01:21:00PM -0500, Bruce Momjian wrote: > What if len < 23? mea culpa. Must go eat lunch. No sugar to brain. (and no, I didn't put the original error in :-) Ross

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Bruce Momjian
> > *** fe-exec.c 2001/01/24 19:43:30 1.98 > > --- fe-exec.c 2001/02/06 02:02:27 1.100 > > *** > > *** 2035,2041 > > if (len > 23) > > len = 23; > > strncpy(buf, res->cmdStatus + 7, len); > > ! buf[23] = '\0'; > > > > return buf; >

[HACKERS] Re: [PATCHES] configure.in patch for readline and curses.

2001-02-06 Thread Peter Eisentraut
Rick Robino writes: > psql starts up with readline support turned on by default. If readline/curses > is broken, this may show up at runtime as a pq_recvbuf error and a core dump. > psql isn't obvious about the relationship to readline, creating a mystery for > first-timers. > > Since it is readl

Re: [HACKERS] Include files for SPI are not installed

2001-02-06 Thread Karel Zak
On Tue, 6 Feb 2001, Oliver Elphick wrote: > Certain include files are installed by src/include/Makefile and by > interfaces/libpq++/Makefile. However, they in turn include others that > are not installed, thus obviating the usefulness of the ones that are. In your module you can use arbitrary

Re: [HACKERS] OID from insert has extra letter

2001-02-06 Thread Ross J. Reedstrom
On Mon, Feb 05, 2001 at 09:17:45PM -0500, Tom Lane wrote: > > Yes, on looking at it I see that someone broke PQoidStatus() in 7.0. > If you want to fix your copy, the patch (line numbers are for current > CVS) is > > Index: fe-exec.c >

[HACKERS] Include files for SPI are not installed

2001-02-06 Thread Oliver Elphick
Certain include files are installed by src/include/Makefile and by interfaces/libpq++/Makefile. However, they in turn include others that are not installed, thus obviating the usefulness of the ones that are. The missing files are these: access/heapam.h access/htup.h access/relscan.h access/rmg

Re: [HACKERS] Using Threads

2001-02-06 Thread The Hermit Hacker
On Tue, 6 Feb 2001, Karel Zak wrote: > > On Tue, 6 Feb 2001, Myron Scott wrote: > > > There are many many globals I had to work around including all the memory > > management stuff. I basically threw everything into and "environment" > > variable which I stored in a thread specific using thr_set

Re: [HACKERS] Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linuxrc.d/init.d script....

2001-02-06 Thread Bruce Momjian
> On Sun, 4 Feb 2001, Peter Eisentraut wrote: > > > Ryan Kirkpatrick writes: > > > > > postgresql -> This is a Linux distribution independent (or so I > > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a > > > few in ./contrib/linux of the pgsql source tree, but they a

Re: [HACKERS] Using Threads

2001-02-06 Thread Karel Zak
On Tue, 6 Feb 2001, Myron Scott wrote: > There are many many globals I had to work around including all the memory > management stuff. I basically threw everything into and "environment" > variable which I stored in a thread specific using thr_setspecific. Yes, it's good. I working on multi-t

Re: [HACKERS] little bug in current CVS

2001-02-06 Thread Peter Eisentraut
Oleg Bartunov writes: > after make clean, make failed with message: > > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > prereqdir=`cd parser/ && pwd` && \ > cd ../../src/include/parser/ && rm -f parse.h && \ > ln -s $prereqdir/parse.h . > ln: ./parser: File exists > make[2

Re: [HACKERS] little bug in current CVS

2001-02-06 Thread Oleg Bartunov
On Tue, 6 Feb 2001, Tom Lane wrote: > Oleg Bartunov <[EMAIL PROTECTED]> writes: > > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > > prereqdir=`cd parser/ && pwd` && \ > > cd ../../src/include/parser/ && rm -f parse.h && \ > > ln -s $prereqdir/parse.h . > > ln: ./parser:

Re: [HACKERS] ADD CONSTRAINT ... FOREIGN KEY and custom data type.

2001-02-06 Thread Stephan Szabo
I think you may be running into the now fixed (for 7.1) bug where ADD CONSTRAINT ... FOREIGN KEY got the column ordering wrong when checking existing data. I may be able to build a patch against 7.0.x since the fix is relatively minor if you don't plan to upgrade when 7.1 comes out. On Mon, 5

Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-06 Thread Peter Eisentraut
Tatsuo Ishii writes: > Moreover if postmaster detaches itself to be a deamon, nohup is not > necessary at all. Right. Scrap that thought then. > BTW, for the startup script, I don't think we need to use pg_ctl. > Invoking postmaster directry seems enough for me. The only reason for > using pg_

[HACKERS] using the same connection?

2001-02-06 Thread Mathieu Dube
Hi y'all, Is it a bad idea for an app to keep just a couple of connections to a database, put semaphore/mutex on them and reuse them all through the program? Of course I would check if their PQstatus isnt at CONNECTION_BAD and reconnect if they were... I need some opinions

Re: [HACKERS] little bug in current CVS

2001-02-06 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > prereqdir=`cd parser/ && pwd` && \ > cd ../../src/include/parser/ && rm -f parse.h && \ > ln -s $prereqdir/parse.h . > ln: ./parser: File exists > make[2]: *** [../../src/include/par

Re: [HACKERS] optimizer/planner ideas (repost)

2001-02-06 Thread Tom Lane
Martin Devera <[EMAIL PROTECTED]> writes: > Inner semijoin scans its left input outputting all rows which > has its pair in right input but doesn't duplicate result when > there are duplicates at right. > The WHERE IN(select...), corelated EXISTS and ANY are > converted to it. This semijoin is sim

Re: [HACKERS] Using Threads

2001-02-06 Thread Myron Scott
> > Sorry I haven't time to see and test your experiment, > but I have a question. How you solve memory management? > The current mmgr is based on global variable > CurrentMemoryContext that is very often changed and used. > Use you for this locks? If yes it is probably problematic > point fo

[HACKERS] Re: Implementing an operator in C?

2001-02-06 Thread Thomas Lockhart
Mario Weilguni wrote: > > Am Sonntag, 4. Februar 2001 20:12 schrieben Sie: > > Mario Weilguni <[EMAIL PROTECTED]> writes: > > > float8 num3 = numeric_float8(num1); > > > > That won't work in the brave new world of 7.1 :-(. You need to do > > something like > > > > float8 num3 =

Re: AW: [HACKERS] timestamp in pg_dump

2001-02-06 Thread Thomas Lockhart
> But the current timestamp does not store a timezone. timestamp with time zone > is supposed to store and output the timezone that was inserted. > The current timestamp has it messed up (sorry), since it does not store a timezone. > It stores time in UTC and always converts output to the timezone

[HACKERS] optimizer/planner ideas

2001-02-06 Thread Devik
Hello, probably you remember my crazy idea involving using indexes directly in scans (and resulting speedup). The idea was given to me by experiences with M$SQL (it is yes another M$ soft but its planner is probably better than pg's - no flames please). Because I studied M$ again I've got another

[HACKERS] Re: TODO list: Allow Java server-side programming

2001-02-06 Thread Derek Young-ADSL
PHP can run java code. It would be easiest, because php doesn't parse php pages, the Zend engine is linked to php to actually parse. Which would make Zend easy to add into Postgresql, (which already runs under apache, which is non-threaded). The only issue is the Zend license.. Of course, this m

Re: [HACKERS] 7.1 beta 3 CHANGES FOR QNX

2001-02-06 Thread Maurizio
> "Tom Lane" <[EMAIL PROTECTED]> writes: >> Well, my question still stands: why aren't the other four flex outputs >> also broken? They all use ECHO. I don't know why, but probably you are right. I only know that if ECHO was not redefined, when I compile with ecpg the output c file has all the o

Re: [GENERAL] Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]

2001-02-06 Thread Dan Wilson
A step in the right direction for this to have the system catalog have pg_user_* views. So dor databases we have: create view pg_user_database as select * from pg_database where pg_get_userbyid(datdba) = CURRENT_USER Of course, this doesn't account for superusers, but I'm sure there is a way th

[HACKERS] ADD CONSTRAINT ... FOREIGN KEY and custom data type.

2001-02-06 Thread Panon, Paul-Andre
For a project we are working on, I have created a custom postgresql data type which is similar to MS SQL Server's uniqueidentifier data type. It uses dynamic link library extension that calls the FreeDCE library to generate GUIDs. Support for the data type and support functions is added to a Post

Re: [HACKERS] ODBC Problem v7.1 beta4

2001-02-06 Thread Eduardo Stern
Yes, I have the same problem... pgaccess also can't see any Views... "Steve Shaffer" <[EMAIL PROTECTED]> escreveu nas notícias de mensagem:[EMAIL PROTECTED] > > Developers, > > Pgsql v7.1 beta4 > ODBC v6.50.00.00 > RedHat v6.2 > > I upgraded from 7.03 to 7.1 beta4 yesterday & see the f

Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-06 Thread Nic Ferrier
>>> Tom Lane <[EMAIL PROTECTED]> 06-Feb-01 12:39:24 AM >>> > "Nic Ferrier" wrote: - the postmaster was being started without nohup Oliver wrote: >> If postmaster is being started by init, it should not need >> nohup, because init never exits and postmaster is not >> going to get shutdown

[HACKERS] Re: [PATCHES] A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.dscript....

2001-02-06 Thread Ryan Kirkpatrick
On Sun, 4 Feb 2001, Peter Eisentraut wrote: > Ryan Kirkpatrick writes: > > > postgresql -> This is a Linux distribution independent (or so I > > hope) init.d/rc.d script that makes use of pg_ctl. There is currently a > > few in ./contrib/linux of the pgsql source tree, but they are RedHat >

Re: [HACKERS] Implementing an operator in C?

2001-02-06 Thread Mario Weilguni
Am Sonntag, 4. Februar 2001 20:12 schrieben Sie: > Mario Weilguni <[EMAIL PROTECTED]> writes: > > float8 num3 = numeric_float8(num1); > > That won't work in the brave new world of 7.1 :-(. You need to do > something like > > float8 num3 = DatumGetFloat8(DirectFunctionCall1(numeri

[HACKERS] little bug in current CVS

2001-02-06 Thread Oleg Bartunov
Hi, after make clean, make failed with message: make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' prereqdir=`cd parser/ && pwd` && \ cd ../../src/include/parser/ && rm -f parse.h && \ ln -s $prereqdir/parse.h . ln: ./parser: File exists make[2]: *** [../../src/include/parser/

[HACKERS] optimizer/planner ideas (repost)

2001-02-06 Thread Martin Devera
Hello, probably you remember my crazy idea involving using indexes directly in scans (and resulting speedup). The idea was given to me by experiences with M$SQL (it is yes another M$ soft but its planner is probably better than pg's - no flames please). Because I studied M$ again I've got another

AW: [HACKERS] timestamp in pg_dump

2001-02-06 Thread Zeugswetter Andreas SB
> I'd like to have pg_dump for 7.1 produce "timestamp with time zone" when > dealing with timestamp type(s). That will prepare us for introducing a > timestamp type without time zones, while allowing reasonable upgrades to > 7.2. But the current timestamp does not store a timezone. timestamp wit

Re: [HACKERS] Postgre SQL for Windows

2001-02-06 Thread Peter T Mount
Quoting sourabh dixit <[EMAIL PROTECTED]>: > Hello! > Can anybody tell me the website from which I can download PostgreSQL > for Windows95. I'm not sure if it will run under Win95, but I have it running fine under NT using Cygwin and WinIPC. While my linux box was down, I had to use it under

Re: [HACKERS] 7.1 beta 3 CHANGES FOR QNX

2001-02-06 Thread Maurizio
> "Tom Lane" <[EMAIL PROTECTED]> writes: >> Well, my question still stands: why aren't the other four flex outputs >> also broken? They all use ECHO. I don't know why, but probably you are right. I only know that if ECHO was not redefined, when I compile with ecpg the output c file has all the o

Re: [HACKERS] Using Threads?

2001-02-06 Thread Karel Zak
On Mon, 5 Feb 2001, Myron Scott wrote: > I have put a new version of my multi-threaded > postgresql experiment at > > http://www.sacadia.com/mtpg.html > > This one actually works. I have added a server > based on omniORB, a CORBA 2.3 ORB from ATT. It >is much smaller than TAO and uses the

[HACKERS] Postgre SQL for Windows

2001-02-06 Thread sourabh dixit
Hello! Can anybody tell me the website from which I can download PostgreSQL for Windows95. With regards, Sourabh