Re: [HACKERS] Re: bugs - lets call an exterminator!

2001-08-23 Thread Vince Vielhaber
On Thu, 23 Aug 2001, Colin 't Hart wrote: Vince asks: Everybody keeps saying bugzilla. What EXACTLY will bugzilla do for us that would make me want to learn it and install it? BTW, the current wheel was invented a year ago 'cuze nothing really fit what we needed. The reasons I would

Re: [HACKERS] Re: bugs - lets call an exterminator!

2001-08-23 Thread Tom Lane
Vince Vielhaber [EMAIL PROTECTED] writes: On Thu, 23 Aug 2001, Colin 't Hart wrote: 5. I think Bugzilla's concepts of products, components and versions fit the way we work. I envisage that 'Postgres', 'Interfaces', 'Languages' might be products that we would have. Within 'Postgres' we would

Re: [HACKERS] Reverse Engineering

2001-08-23 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: Peter Harvey wrote: 2. How do I determine the AccessMethod specified when an index was created? you can parse it from pg_indexes.indexdef ... which relies on pg_get_indexdef(index OID). Or, look at pg_class.relam, which is zero for regular tables

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Bruce Momjian
I also noticed that this item has been there for a while: *Encrpyt passwords in pg_shadow table using MD5 (Bruce, Vince) While you are there do you think it's possible to make an mcrypt function? :) See contrib/pgcrypto. -- Bruce Momjian|

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Bruce Momjian
As I was browsing TODO, I noticed a couple unassigned items that I may be able to help with (I haven't worked with the source before): *Add use of 'const' for variables in source tree I would discuss this item with the hackers list and see exactly what people want done with it. *Convert

Re: [HACKERS] CURRENT OF cursor without OIDs

2001-08-23 Thread Tom Lane
Zeugswetter Andreas SB SD [EMAIL PROTECTED] writes: Hiroshi wrote: In addtion, xmin wouldn't be so reliable in the near future because it would be updated to FrozenXID (=2) by vacuum. I thought concurrent vacuum with an open cursor is not at all possible. If it were, it would not be

[HACKERS] OLAP, Aggregates, and order of operations

2001-08-23 Thread mlw
I need to do some OLAP stuff, and I asked previously if there were a way to pass multiple parameters to an aggrigate function. i.e.: select mycube(value1, value2, value3) from table group by value1; I looked through the code and it is non-trivial to do, one would have to alter the grammar to

[HACKERS] Re: [PATCHES] encoding names

2001-08-23 Thread Peter Eisentraut
Tatsuo Ishii writes: But getdbencoding isn't semantically different from the old getdatabaseencoding. encoding isn't the right term anyway, methinks, it should be character set. So maybe database_character_set()? (No get please.) I'm not a native English speaker, so please feel free

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Jeff Davis writes: *Convert remaining fprintf(stderr,...)/perror() to elog() This isn't quite as easy as a mechanical conversion, mind you, because elog of course has rather complex side effects besides printing out a message. AFAIR, elog at

Re: [HACKERS] OLAP, Aggregates, and order of operations

2001-08-23 Thread Tom Lane
mlw [EMAIL PROTECTED] writes: I need to do some OLAP stuff, and I asked previously if there were a way to pass multiple parameters to an aggrigate function. i.e.: I looked through the code and it is non-trivial to do, Offhand I don't know of any fundamental reason why it couldn't be done, but

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Bruce Momjian
AFAIR, elog at NOTICE or DEBUG level isn't really supposed to have any side-effects. The bigger issue is that you have to be careful about using it in certain places, mainly during startup or for reporting communication errors. (send failure - elog - tries to send message to client - send

Re: [HACKERS] Reverse Engineering

2001-08-23 Thread Hannu Krosing
Peter Harvey wrote: Great progress today on my Reverse Engineering efforts. However; I have some comments. 1. How can I switch databases (where I would normally use USE)? You just open another connection . If you mean psql jou do \c otherdatabasename 2. How do I determine the

[HACKERS] Re: bugs - lets call an exterminator!

2001-08-23 Thread Colin 't Hart
Vince asks: Everybody keeps saying bugzilla. What EXACTLY will bugzilla do for us that would make me want to learn it and install it? BTW, the current wheel was invented a year ago 'cuze nothing really fit what we needed. The reasons I would choose Bugzilla: 1. It's *not* written by us so

RE: [HACKERS] CURRENT OF cursor without OIDs

2001-08-23 Thread Zeugswetter Andreas SB SD
Hiroshi wrote: There could be DELETE operations for the tuple from other backends also and the TID may disappear. Because FULL VACUUM couldn't run while the cursor is open, it could neither move nor remove the tuple but I'm not sure if the new VACUUM could

RE: [HACKERS] Locale by default?

2001-08-23 Thread Zeugswetter Andreas SB SD
I don't understand why you object the idea giving PostgreSQL the ability to turn off the locale support in configuration/compile time. In that way, there's no inconveniences for many users. I don't mind at all the ability to turn it off. My point is that the compile time is the wrong

[HACKERS] Toast, Text, blob bytea Huh?

2001-08-23 Thread jason . ory
I'm trying my best to convert from MySQL to PgSQL but I cant get a good clear answer about certian issures.Mainly TEXT, TOAST,BLOB , BYTEA etc. It was an easy task in mysql but everything in the archives about , text , toast and bytea is just confusing me with postgresql. I have Bruces's book

[HACKERS] Re: Escaping strings for inclusion into SQL queries

2001-08-23 Thread Christopher Masto
On Wed, Aug 22, 2001 at 05:16:44PM +, Florian Weimer wrote: We therefore suggest that a string escaping function is included in a future version of PostgreSQL and libpq. A sample implementation is provided below, along with documentation. I use Perl, which (through DBD::Pg) has a quote

Re: [HACKERS] Re: Escaping strings for inclusion into SQL queries

2001-08-23 Thread Florian Weimer
Christopher Masto [EMAIL PROTECTED] writes: I only have one issue - the SQL standard seems to support the use of '' to escape a single quote, but not \'. Though PostgreSQL has an extended notion of character string literals, I think that the usual policy of using the standard interface when

[HACKERS] Reverse Engineering

2001-08-23 Thread Peter Harvey
There seem to be several ways to get at just about anything in the Catalog Tables. The ODBC driver, psql, and pg_dump typically use slightly diff sql and you guys have suggested even better ways. Forgive me as I ask for more. How do I determine the foriegn keys in a table? I see

[HACKERS] [PATCH] Win32 errno a little bit safer

2001-08-23 Thread Magnus Naeslund\(f\)
Hello, i just reviewed the win32 errno patch and i saw that maybe i didn't really played it totally safe in my last suggestion, the system table might pick up the msg but not the netmsg.dll, so better try both. I also added a hex printout of the errno appended to all messages, that's nicer. If

Re: [HACKERS] User locks code

2001-08-23 Thread Massimo Dal Zotto
Well, ability to lock only unlocked rows in select for update is useful, of course. But uniq features of user'locks are: 1. They don't interfere with normal locks hold by session/transaction. 2. Share lock is available. 3. User can lock *and unlock objects* inside transaction, which is not

[HACKERS] Assessment on namespace clean include file names

2001-08-23 Thread Peter Eisentraut
Here is what we install by default and what we could do about it: c.h [1] config.hrename to pg_config.h ecpgerrno.h ok ecpglib.h ok ecpgtype.h ok iodbc/ [3] iodbc.h isql.h isqlext.h lib/

Re: [HACKERS] Toast, Text, blob bytea Huh?

2001-08-23 Thread Joe Conway
I'm trying my best to convert from MySQL to PgSQL but I cant get a good clear answer about certian issures.Mainly TEXT, TOAST,BLOB , BYTEA etc. It was an easy task in mysql but everything in the archives about , text , toast and bytea is just confusing me with postgresql. I have Bruces's

Re: [HACKERS] Remove --enable-syslog?

2001-08-23 Thread Bruce Momjian
Originally, I added --enable-syslog because it used to be an option in config.h only. However, I wonder why we don't always compile it in, it's off by default anyway. The only reason I could think of is a portability problem. Is there any platform that does not supply the standard syslog

Re: [HACKERS] Remove --enable-syslog?

2001-08-23 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Is there any platform that does not supply the standard syslog interface? Why worry? Do AC_CHECK_FUNC(syslog), or some such. regards, tom lane ---(end of broadcast)--- TIP 2:

[HACKERS] Re: OLAP, Aggregates, and order of operations

2001-08-23 Thread mlw
Tom Lane wrote: mlw [EMAIL PROTECTED] writes: I need to do some OLAP stuff, and I asked previously if there were a way to pass multiple parameters to an aggrigate function. i.e.: I looked through the code and it is non-trivial to do, Offhand I don't know of any fundamental reason why it

RE: [HACKERS] User locks code

2001-08-23 Thread Mikheev, Vadim
If the licence becomes a problem I can easily change it, but I prefer the GPL if possible. We just wanted to make sure the backend changes were not under the GPL. No, Bruce - backend part of code is useless without interface functions and I wonder doesn't GPL-ed interface implementation

Re: [HACKERS] User locks code

2001-08-23 Thread Bruce Momjian
If the licence becomes a problem I can easily change it, but I prefer the GPL if possible. We just wanted to make sure the backend changes were not under the GPL. No, Bruce - backend part of code is useless without interface functions and I wonder doesn't GPL-ed interface

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Peter Eisentraut
Tom Lane writes: AFAIR, elog at NOTICE or DEBUG level isn't really supposed to have any side-effects. The bigger issue is that you have to be careful about using it in certain places, mainly during startup or for reporting communication errors. (send failure - elog - tries to send message

RE: [HACKERS] User locks code

2001-08-23 Thread Mikheev, Vadim
For example, one could use user-locks for processing incoming orders by multiple operators: select * from orders where user_lock(orders.oid) = 1 LIMIT 1 - so each operator would lock one order for processing and operators wouldn't block each other. So, could such application be

Re: [HACKERS] User locks code

2001-08-23 Thread Bruce Momjian
For example, one could use user-locks for processing incoming orders by multiple operators: select * from orders where user_lock(orders.oid) = 1 LIMIT 1 - so each operator would lock one order for processing and operators wouldn't block each other. So, could such application be

RE: [HACKERS] User locks code

2001-08-23 Thread Mikheev, Vadim
I assume any code that uses contrib/userlock has to be GPL'ed, meaning it can be used for commercial purposes but can't be sold as binary-only, and actually can't be sold for much because you have to make the code available for near-zero cost. I'm talking not about solding

Re: [HACKERS] Assessment on namespace clean include file names

2001-08-23 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: [1] -- The libpq-int.h draws in a lot of internal structure, true to the name. Something should be done about that, such as not installing it, or moving it to a hidden place. Ideas? libpq-int.h was always intended to be strictly internal. I made

Re: [HACKERS] User locks code

2001-08-23 Thread Bruce Momjian
No, you were clear. So I missed your near-zero cost sentence. OK. My assumption is that once you link that code into the backend, the entire backend is GPL'ed and any other application code you link into it is also (stored procedures, triggers, etc.) I don't think your client

RE: [HACKERS] User locks code

2001-08-23 Thread Mikheev, Vadim
Application would explicitly call user_lock() functions in queries, so issue is still not clear for me. And once again - Well, yes, it calls user_lock(), but the communication is not OS-linked, it is linked over a network socket, so I don't think the GPL spreads over a socket. Just as

Re: [HACKERS] User locks code

2001-08-23 Thread Bruce Momjian
Well, yes, it calls user_lock(), but the communication is not OS-linked, it is linked over a network socket, so I don't think the GPL spreads over a socket. Just as telnet'ing somewhere an typing 'bash' doesn't make your telnet GPL'ed, so I think the client code is safe. To the client,

Re: [HACKERS] User locks code

2001-08-23 Thread Tom Lane
I definitely agree with Vadim here: it's fairly silly that the contrib userlock code is GPL'd, when it consists only of a few dozen lines of wrapper for the real functionality that's in the main backend. The only thing this licensing setup can accomplish is to discourage people from using the

Re: [HACKERS] User locks code

2001-08-23 Thread Bruce Momjian
I definitely agree with Vadim here: it's fairly silly that the contrib userlock code is GPL'd, when it consists only of a few dozen lines of wrapper for the real functionality that's in the main backend. The only thing this licensing setup can accomplish is to discourage people from using

RE: [HACKERS] CURRENT OF cursor without OIDs

2001-08-23 Thread Mikheev, Vadim
AFAICS, if you are holding an open SQL cursor, it is sufficient to check that ctid hasn't changed to know that you have the same, un-updated tuple. Under MVCC rules, VACUUM will be unable to delete any tuple that is visible to your open transaction, and so new-style VACUUM cannot recycle

Re: [HACKERS] CURRENT OF cursor without OIDs

2001-08-23 Thread Hiroshi Inoue
"Mikheev, Vadim" wrote: AFAICS, if you are holding an open SQL cursor, it is sufficient to check that ctid hasn't changed to know that you have the same, un-updated tuple. Under MVCC rules, VACUUM will be unable to delete any tuple that is visible to your open transaction, and so

[HACKERS] ERP Applications on Postgresql -- ERPTool

2001-08-23 Thread Amandeep Singh
Hi Everyone, Just wanted to let you all know that I have been working on development of financial applications using,java, javascript, javabeans and of course PostgreSQL database for past one year. I was out of touch with the community for this time and it kinda feels like as if I am coming out

RE: [HACKERS] A couple items on TODO

2001-08-23 Thread Christopher Kings-Lynne
As I was browsing TODO, I noticed a couple unassigned items that I may be able to help with (I haven't worked with the source before): *Add use of 'const' for variables in source tree I would discuss this item with the hackers list and see exactly what people want done with it. I

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Bruce Momjian
As I was browsing TODO, I noticed a couple unassigned items that I may be able to help with (I haven't worked with the source before): *Add use of 'const' for variables in source tree I would discuss this item with the hackers list and see exactly what people want done with

[HACKERS] Permissions for large-object comments

2001-08-23 Thread Tom Lane
Shane Wegner [EMAIL PROTECTED] writes: test= \lo_unlink 89803 ERROR: pg_description: Permission denied. Hmm. Maybe those client-side comment manipulations in psql aren't such a hot idea. I know I never tested them as non-superuser :-( Shane, try that from a superuser Postgres userid.

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: I have noticed while working on command.c and heap.c that half the functions pass 'const char *' and the other half pass just 'char *'. This is a pain Yeah, people have started to use 'const' in new code, but the older stuff doesn't use it,

[HACKERS] Re: OLAP, Aggregates, and order of operations

2001-08-23 Thread mlw
Tom Lane wrote: mlw [EMAIL PROTECTED] writes: If the needed parameters are all the same datatype, maybe you could put them into an array and pass the array as a single argument to the aggregate. How would you do this without having to make multiple SQL calls? I was thinking

Re: [HACKERS] A couple items on TODO

2001-08-23 Thread Jeff Davis
*Add use of 'const' for variables in source tree I would discuss this item with the hackers list and see exactly what people want done with it. I have noticed while working on command.c and heap.c that half the functions pass 'const char *' and the other half pass just 'char *'. This

Re: [HACKERS] Re: OLAP, Aggregates, and order of operations

2001-08-23 Thread Tom Lane
mlw [EMAIL PROTECTED] writes: So, what would the order of operation be? I assume my_array_constructor() would be called first, and the return value then be passed to my_aggregate() along with the state value being set to the initial state, then subsequent calls to my_array_constructor(),

Re: [HACKERS] Link to bug webpage

2001-08-23 Thread David Ford
Bruce Momjian wrote: How do you communicate that to people looking at the content? Do you put in big letters at the top, This list is not complete. The fact an items is missing from the list (new bug) is just as important as an item appearing on the list. How do you distinguish that from

Re: [HACKERS] Link to bug webpage

2001-08-23 Thread Hannu Krosing
David Ford wrote: Bruce Momjian wrote: That is the real question. Do we want to rely more heavily on a bug database rather than the email lists? I haven't heard many say they want that. I'd very much like a bugzilla because I can do research on bugs past or present now as well as

[HACKERS] Re: [PATCHES] encoding names

2001-08-23 Thread Tatsuo Ishii
BTW, what's wrong with encoding? I don't think, for example EUC-JP or utf-8, are character set names. Hmm, SQL talks of character sets, it has a CHARACTER_SETS view and such. It's slightly incorrect, I agree. Maybe we should not touch getdatabaseencoding() right now, given that the

RE: [HACKERS] A couple items on TODO

2001-08-23 Thread Christopher Kings-Lynne
That's good information, now I have a better idea what I am looking for. I am using Source Navigator (good recommendation I got reading this list). I am basically just trying to find either variables that can be declared const, or inconsistancies (as Chris mentions). If anyone else has a

Re: [HACKERS] User locks code

2001-08-23 Thread Hannu Krosing
Tom Lane wrote: I definitely agree with Vadim here: it's fairly silly that the contrib userlock code is GPL'd, when it consists only of a few dozen lines of wrapper for the real functionality that's in the main backend. As it seems a generally useful feature, it could at least be LGPL'd so

Re: [HACKERS] Link to bug webpage

2001-08-23 Thread David Ford
Honestly I wasn't aware postgres had any bugs... tongue in cheek. What I mean is PG works very nicely for me and I haven't had any problems with it, so that means no bugs. Yes there are bugs and things to be solved, but from my perspective it is already a pretty darn good piece of software.

Re: [HACKERS] Link to bug webpage

2001-08-23 Thread David Ford
Bruce Momjian wrote: That is the real question. Do we want to rely more heavily on a bug database rather than the email lists? I haven't heard many say they want that. I'd very much like a bugzilla because I can do research on bugs past or present now as well as know the status of them.

[HACKERS] Remove --enable-syslog?

2001-08-23 Thread Peter Eisentraut
Originally, I added --enable-syslog because it used to be an option in config.h only. However, I wonder why we don't always compile it in, it's off by default anyway. The only reason I could think of is a portability problem. Is there any platform that does not supply the standard syslog

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

2001-08-23 Thread Tom Lane
Hiroshi Inoue [EMAIL PROTECTED] writes: Hmm OIDs would be optional in 7.2. Is it known(announced) to pgsql-jdbc list ? Doesn't seem particularly relevant to this issue though. An application that's using OIDs to identify rows would certainly not choose to create its tables without OIDs.

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC ch

2001-08-23 Thread Ned Wolpert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23-Aug-2001 Rene Pijlman wrote: What should the semantics be exactly? How about the multiple INSERT's i've been reading about on hackers? ... Only the OID of the last row inserted by the statement? How about an UPDATE statement that

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

2001-08-23 Thread Rene Pijlman
On Thu, 23 Aug 2001 14:44:19 -0400, you wrote: Ned Wolpert [EMAIL PROTECTED] writes: Should the backend support the function getLastInsertedOID()? seems doable and reasonable to me: whenever an OID is returned to the client in an INSERT or UPDATE command result, also stash it in a static

[HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2.

2001-08-23 Thread Ned Wolpert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I like your function name, get_last_returned_oid(). That works for me. On 23-Aug-2001 Tom Lane wrote: Ned Wolpert [EMAIL PROTECTED] writes: Should the backend support the function getLastInsertedOID() or even getLastInsertedPrimaryKey() (or

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

2001-08-23 Thread Tom Lane
Rene Pijlman [EMAIL PROTECTED] writes: On Thu, 23 Aug 2001 14:44:19 -0400, you wrote: seems doable and reasonable to me: whenever an OID is returned to the client in an INSERT or UPDATE command result, also stash it in a static variable that can be picked up by this function. What should

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC ch

2001-08-23 Thread Ned Wolpert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23-Aug-2001 Tom Lane wrote: I assume this OID would be associated with a client connection. Is this going to work with client side connection pooling? Good point. Will this really get around the original poster's problem?? It must. If

[HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

2001-08-23 Thread Tom Lane
Ned Wolpert [EMAIL PROTECTED] writes: Should the backend support the function getLastInsertedOID() or even getLastInsertedPrimaryKey() (or both)? I don't think you have any chance of doing the latter --- for one thing, how are you going to declare that function's return type? But the former

Re: [HACKERS] Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

2001-08-23 Thread Hiroshi Inoue
Tom Lane wrote: Ned Wolpert [EMAIL PROTECTED] writes: Should the backend support the function getLastInsertedOID() or even getLastInsertedPrimaryKey() (or both)? I don't think you have any chance of doing the latter --- for one thing, how are you going to declare that function's return

[HACKERS] Re: [GENERAL] Postgresql log analyzer

2001-08-23 Thread Gilles DAROLD
Hi all, I have updated the drafts for pg log analyzer especially for EXPLAIN output. What do you want to see as statistics result. Currently I only output the following: - scan type - startup cost - total cost - number of rows returned - and the width There's certainly other usefull