[HACKERS] help needed with CREATE CONVERSION

2002-07-12 Thread Tatsuo Ishii
I encountered a problem while implementing new CREATE CONVERSION. Since converion procs are dynamically invoked while doing an encoding conversion, it might fail for some reasons: (1) stale pg_conversion entry. If someone re-register that proc, the oid might be changed and the reference from

Re: [HACKERS] pgbench questions

2002-07-12 Thread Tatsuo Ishii
[Cc:ed to hackers] From: [EMAIL PROTECTED] (Neil Conway) Subject: pgbench questions Date: Sat, 13 Jul 2002 00:57:37 -0400 Message-ID: <[EMAIL PROTECTED]> > Hi, > > I was looking at doing some performance profiling on PostgreSQL, and > I had a few questions on pgbench. > > (1) Is there a reason

Re: [HACKERS] [COMMITTERS] pgsql/ oc/src/sgml/catalogs.sgml oc/src/sgml/r ...

2002-07-12 Thread Christopher Kings-Lynne
Is it at all a problem that several columns in pg_conversion have the same name as columns in pg_constraint? Should the ones in pg_conversion become: convname instead of conname, etc. simply for clarity? Chris - Original Message - > Log message: > Second phase of committing Rod Taylor'

Re: [HACKERS] Unique and Primary Key Constraints

2002-07-12 Thread Rod Taylor
> > I prefer ...add constraint. After a while (release or 2) removal of > > create unique index all together. > > Remove CREATE UNIQUE INDEX entirely? Why? I was looking to encourage users to use core SQL as I spend more time than I want converting between systems -- thanks in part to users wh

Re: [HACKERS] Unique and Primary Key Constraints

2002-07-12 Thread Bruce Momjian
Rod Taylor wrote: > I'm going to change the pg_dump command to pull these constraints out of > pg_constaint where possible, creating the appropriate alter table add > constraint command (see primary key). > > > Should unique constraints created with 'create index' (no entry in > pg_constraint) b

Re: [HACKERS] test data for query optimizer

2002-07-12 Thread Mark kirkwood
What about the TPC-H benchmark ? I cant recall if it has more than 10 tables, but it seemed like the queries were "quite good" for a benchmark. In addition it comes with a data generator. regards Mark >On Sat, 2002-07-13 at 04:05, Neil Conway wrote: > I'd like to look at the performance of the

Re: [HACKERS] test data for query optimizer

2002-07-12 Thread Neil Conway
On Sat, Jul 13, 2002 at 11:18:14AM +0800, Christopher Kings-Lynne wrote: > What about the OSDB benchmark? Does that contain a large dataset? No -- it only uses 5 relations total, with the most complex query only involving 4 joins. Cheers, Neil -- Neil Conway <[EMAIL PROTECTED]> PGP Key ID: D

Re: [HACKERS] test data for query optimizer

2002-07-12 Thread Christopher Kings-Lynne
What about the OSDB benchmark? Does that contain a large dataset? Chris - Original Message - From: "Neil Conway" <[EMAIL PROTECTED]> To: "PostgreSQL Hackers" <[EMAIL PROTECTED]> Sent: Saturday, July 13, 2002 12:05 AM Subject: [HACKERS] test data for query optimizer > I'd like to look

[HACKERS] Unique and Primary Key Constraints

2002-07-12 Thread Rod Taylor
I'm going to change the pg_dump command to pull these constraints out of pg_constaint where possible, creating the appropriate alter table add constraint command (see primary key). Should unique constraints created with 'create index' (no entry in pg_constraint) be re-created via alter table add

Re: [HACKERS] Memo on dropping practices

2002-07-12 Thread Rod Taylor
On Fri, 2002-07-12 at 15:17, Tom Lane wrote: > Now that the pg_depend mechanism is mostly in there, it is no longer > a good idea to delete things directly (for example, by calling > heap_drop_with_catalog or even just heap_delete'ing a catalog tuple). I noticed that SERIAL sequences aren't dropp

Re: [HACKERS] Memo on dropping practices

2002-07-12 Thread Bruce Momjian
Thanks, TODO updated. I split out "Make constraints clearer in dump file" into a foreign key version, which I marked as done, and a second version which I left as undone. Thanks. That's a heap of items completed. --- Rod

Re: [HACKERS] Memo on dropping practices

2002-07-12 Thread Rod Taylor
> * Add pg_depend table for dependency recording; use sysrelid, oid, > depend_sysrelid, depend_oid, name > * Auto-destroy sequence on DROP of table with SERIAL; perhaps a separate > SERIAL type > * Have SERIAL generate non-colliding sequence names when we have >

Re: [HACKERS] Memo on dropping practices

2002-07-12 Thread Bruce Momjian
Tom Lane wrote: > Now that the pg_depend mechanism is mostly in there, it is no longer > a good idea to delete things directly (for example, by calling > heap_drop_with_catalog or even just heap_delete'ing a catalog tuple). > > The correct thing to do is to call performDeletion() with a parameter

[HACKERS] Memo on dropping practices

2002-07-12 Thread Tom Lane
Now that the pg_depend mechanism is mostly in there, it is no longer a good idea to delete things directly (for example, by calling heap_drop_with_catalog or even just heap_delete'ing a catalog tuple). The correct thing to do is to call performDeletion() with a parameter specifying what it is you

Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function

2002-07-12 Thread Joe Conway
Thomas Lockhart wrote: > (crossposted to -hackers, should follow up on that list) > OK, this is in the "can't do it what we have" category. Should we have > it accept a regular expression rather than a simple string? In either > case it should probably go into the main distro. Except that I se

Re: [HACKERS] test data for query optimizer

2002-07-12 Thread Tom Lane
[EMAIL PROTECTED] (Neil Conway) writes: > I'd like to look at the performance of the query optimizer (both the > traditional one and GEQO) when joining large numbers of tables: 10-15, > or more. In order to do that (and to get meaningful results), I'll > need to work with some data that actually r

Re: [HACKERS] CHAR constants

2002-07-12 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > So, what should the behavior be of a constant declared as > CHAR 'hi' > ? Right now it fails, since SQL9x asks that the char type defaults to a > length of one and our parser does not distinguish between usage as a > constant declaration and as a colu

[HACKERS] test data for query optimizer

2002-07-12 Thread Neil Conway
I'd like to look at the performance of the query optimizer (both the traditional one and GEQO) when joining large numbers of tables: 10-15, or more. In order to do that (and to get meaningful results), I'll need to work with some data that actually requires joins of that magnitude. Ideally, I'd li

[HACKERS] CHAR constants

2002-07-12 Thread Thomas Lockhart
So, what should the behavior be of a constant declared as CHAR 'hi' ? Right now it fails, since SQL9x asks that the char type defaults to a length of one and our parser does not distinguish between usage as a constant declaration and as a column definition (where you would want the "char(1)" to

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Andrew Sullivan
On Fri, Jul 12, 2002 at 03:48:59PM +0200, Zeugswetter Andreas SB SD wrote: > Imho the advantages of an automatic coercion would outweigh the few > corner cases where the behavior would not be intuitive to > everybody. How then would one get the correct behaviour from char()? A -- Andrew S

Re: [HACKERS] Bug of PL/pgSQL parser

2002-07-12 Thread Tom Lane
"eutm" <[EMAIL PROTECTED]> writes: > Dear Sirs!:)I encounted one small problem,working with > PostgreSQL 7.3devel.It can look a > bit strange,but i have to use whitespaces in names of databases,tables,fields > and so on(like "roomno jk").It's possible to create them all and work with them >

Re: [HACKERS] [GENERAL] workaround for lack of REPLACE() function

2002-07-12 Thread Thomas Lockhart
(crossposted to -hackers, should follow up on that list) > Well, OVERLAY is defined as: > overlay(string placing string from integer [for integer]) > and replace() is defined (by me at least) as: > replace(inputstring, old-substr, new-substr) OK. > OVERLAY requires that I know the "fr

Re: [HACKERS] [PATCHES] Changes in /contrib/fulltextindex

2002-07-12 Thread Bruce Momjian
Florian Helmberger wrote: > Hi. > > > Florian, I haven't seen this patch yet. Did you send it in? > > Yes, I sent it to Christopher for reviewing, as allready mentioned by > himself :) > I still had not the time to update the docs though, hope to get this done > next week. Yes, I had an email

Re: [HACKERS] Can I have multiple cursors open ...

2002-07-12 Thread Thomas Lockhart
> Is this possible ? Sure. - Thomas ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread John Liu
There is no comparison of varchar to char in Oracle too. Scott provided cast cases are some unique features in psql, each database MAY handle those casting differently. In good design/application, char should be replaced by varchar type unless you know the exact bytes. It would be not bad idea t

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Stephan Szabo
On Fri, 12 Jul 2002, Tom Lane wrote: > "Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: > >> If the conversion where varchar(5) --> char(5) then > >> they would compare equal. > > > I am not sure, since, if the varchar stored 'S ' then the comparison > > to a char 'S' should probably sti

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Zeugswetter Andreas SB SD
> Has anyone studied how other DBMSs handle CHAR vs VARCHAR? Judging > from the number of questions we get on this point, I have to wonder > if we are not out of step with the way other systems do it. Well, I already gave the Informix example, that compares them as equal. (they obviously coerce

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: >> If the conversion where varchar(5) --> char(5) then >> they would compare equal. > I am not sure, since, if the varchar stored 'S ' then the comparison > to a char 'S' should probably still fail, There is no comparison of varchar to ch

Re: [HACKERS] Bug of PL/pgSQL parser

2002-07-12 Thread Rod Taylor
I see this on the TODO list: # Fix PL/PgSQL to handle quoted mixed-case identifiers Perhaps you could make a view (alias the names with spaces) to work on? On Fri, 2002-07-12 at 06:31, eutm wrote: > > Dear Sirs!:)I encounted one small problem,working with > PostgreSQL 7.3devel.It can

Re: [HACKERS] urgent needed

2002-07-12 Thread Oleg Bartunov
On Fri, 12 Jul 2002, [EMAIL PROTECTED] wrote: > Hi > We’re two doctoring students and we have a little problem to resolve. > We’re using Grass5pre3 and PostgreSQL 7.2 (Linux)to map vehicular > pollution of our city. We have a map of the streets and we have to > assign 24 values (+ the label) to e

[HACKERS] Can I have multiple cursors open ...

2002-07-12 Thread Jim Parker
.. inside of each other using ECPG ? I have a situation where it would be advantages to open a cursor, retrieve a tuple, then open another query based on the results of the first. Then when that query has been processed return to the first query and get the second tuple. Is this possible ? che

[HACKERS] Bug of PL/pgSQL parser

2002-07-12 Thread eutm
Dear Sirs!:)I encounted one small problem,working with PostgreSQL 7.3devel.It can look a bit strange,but i have to use whitespaces in names of databases,tables,fields and so on(like "roomno jk").It's possible to create them all and work with them (INSERT,DELETE,UPDATE),but PL/pgSQL parse

[HACKERS] urgent needed

2002-07-12 Thread [EMAIL PROTECTED]
Hi We’re two doctoring students and we have a little problem to resolve. We’re using Grass5pre3 and PostgreSQL 7.2 (Linux)to map vehicular pollution of our city. We have a map of the streets and we have to assign 24 values (+ the label) to each street. What would be a smart way to solve this probl

Re: [HACKERS] [PATCHES] Changes in /contrib/fulltextindex

2002-07-12 Thread Florian Helmberger
Hi. > Florian, I haven't seen this patch yet. Did you send it in? Yes, I sent it to Christopher for reviewing, as allready mentioned by himself :) I still had not the time to update the docs though, hope to get this done next week. Florian ---(end of broadcast)---

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Zeugswetter Andreas SB SD
> I guess the strangest part was that both a.foo = 'S' and b.foo = 'S' but > not a.foo=b.foo; (a.foo is varchar(5) , b.foo is char(5) ) > > I guess that tha 'S' that b.foo gets compared to is converted to 'S' > before comparison but when comparing varchar(5) and char(5) they are > both comp