Re: [HACKERS] Index/Function organized table layout

2003-10-03 Thread Hannu Krosing
James Rogers kirjutas N, 02.10.2003 kell 23:44: On Thu, 2003-10-02 at 12:09, Hannu Krosing wrote: So what you really need is the CLUSTER command to leave pages half-empty and the tuple placement logic on inserts/updates to place new tuples near the place where they would be placed by

Re: [HACKERS] Quick question

2003-10-03 Thread Kris Jurka
On Fri, 3 Oct 2003, Christopher Kings-Lynne wrote: Hi guys, If someone could help me with this, it would be cool. How do I query the catalogs to find the underlying index for a constraint? (Assuming the constraint is primary or unique) For a primary key you can do: SELECT cls.relname

Re: [HACKERS] ecpg doesn't compile (datetime.h/dtime_t)

2003-10-03 Thread Michael Meskes
On Mon, Sep 29, 2003 at 06:41:48PM +0100, Patrick Welche wrote: Today's cvs doesn't compile. I think it is due to cvs diff -r1.7 -r1.8 src/interfaces/ecpg/include/datetime.h I have dtime_t defined in my sys/types.h. The old version of datetime.h used I tried too hide these type definitions

Re: [HACKERS] Weird locking situation

2003-10-03 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: OK, I tried it again and it still seems buggy to me... I wonder if it's something to do with the tsearch trigger on food_foods? I tried a table with a simple BEFORE trigger and it didn't fail. But when I added a GIST index, it did: [ install

[HACKERS] Using backslash in query

2003-10-03 Thread Michael Brusser
I'm afraid I'm confused about something very simple... but anyway I need to run a query on a varchar field containing a backslash. My first attempt looked like this: SELECT smth. FROM tbl WHERE situation LIKE '%\\%'; This did not returned any rows. I looked up for a reference, confirmed that

[HACKERS] timestamp.c is broken (probably by ecpg) in 7.4

2003-10-03 Thread Bruno Wolff III
I get the error message below when trying to 'make' current cvs: gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I../../../../src/interfaces/ecpg/include -I../../../../src/include/utils -I../../../../src/include -D_GNU_SOURCE -g -c timestamp.c -o timestamp.o In file included

Re: [HACKERS] minor view creation weirdness

2003-10-03 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: I'd almost argue that we should change this message to an error I agree. Except that it would totally break backwards-compatibility? Well, that's a possible problem. How many such views do you think are out there, given the existence of the

Re: [HACKERS] Quick question

2003-10-03 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: If someone could help me with this, it would be cool. How do I query the catalogs to find the underlying index for a constraint? (Assuming the constraint is primary or unique) A first approximation is that the constraint and the index have

Re: [HACKERS] ecpg doesn't compile (datetime.h/dtime_t)

2003-10-03 Thread Patrick Welche
On Fri, Oct 03, 2003 at 12:59:19PM +0200, Michael Meskes wrote: On Mon, Sep 29, 2003 at 06:41:48PM +0100, Patrick Welche wrote: Today's cvs doesn't compile. I think it is due to cvs diff -r1.7 -r1.8 src/interfaces/ecpg/include/datetime.h I have dtime_t defined in my sys/types.h. The old

[HACKERS] Oracle/PostgreSQL incompatibilities

2003-10-03 Thread Rainer Klute
Ladies and Gentemen, in a database project I ported an Oracle database definition to PostgreSQL 7.3.2 as an aside. During this process I found a couple of incompatibilities in the SQL dialects of both DBMS. I compiled the following list for whatever it might be good for - for example to

[HACKERS] calling functions through a pointer

2003-10-03 Thread Max Jacob
Hallo, I wonder if there is a way to call functions in plpgsql having their oid. As an example: suppose i have a table that contains oids to functions and i have some statements that select some rows and must call the corresponding functions. Of course i can do it using dynamic sql (building

[HACKERS] Question regarding coopting Database Engine

2003-10-03 Thread Steve Yalovitser
Hello, I'd like to know if its possible to coopt the postgres storage subsystem to rely entirely on ram based structures, rather than disk. Any documentation or ideas would be appreciated. Cheers, Steve ---(end of broadcast)--- TIP 1: subscribe

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Andrew Sullivan
On Thu, Oct 02, 2003 at 02:15:33PM -0500, Bruno Wolff III wrote: It might be better to split into two different trees. One just gets bug fixes, the other gets bug fixes plus enhancements that won't require an initdb. Yes, please. Please, please do not force all users to accept new features in

Re: [HACKERS] Weird locking situation

2003-10-03 Thread Oleg Bartunov
On Fri, 3 Oct 2003, Tom Lane wrote: Christopher Kings-Lynne [EMAIL PROTECTED] writes: OK, I tried it again and it still seems buggy to me... I wonder if it's something to do with the tsearch trigger on food_foods? I tried a table with a simple BEFORE trigger and it didn't fail. But when

Re: [HACKERS] Using backslash in query

2003-10-03 Thread Tom Lane
Michael Brusser [EMAIL PROTECTED] writes: But when I doubled the number of backslashes: SELECT smth. FROM tbl WHERE situation LIKE '%%'; - it actually worked fine. Backslash is special to both the string-literal parser and the LIKE code. So when you write the above, the pattern value

Re: [HACKERS] Oracle/PostgreSQL incompatibilities

2003-10-03 Thread Rod Taylor
+ CREATE SCHEMA: Sometimes a schema created in PostgreSQL disappears if there is nothing in it. If true, this would be a bug. Do you have a reproducible test case? + CREATE INDEX: PostgreSQL should allow specifying a namespace for the index, even if the namespace is required

Re: [HACKERS] Question regarding coopting Database Engine

2003-10-03 Thread scott.marlowe
On Tue, 30 Sep 2003, Steve Yalovitser wrote: Hello, I'd like to know if its possible to coopt the postgres storage subsystem to rely entirely on ram based structures, rather than disk. Any documentation or ideas would be appreciated. Sure, create a ram disk. Set $PGDATA to it with proper

Re: [HACKERS] Question regarding coopting Database Engine

2003-10-03 Thread Rod Taylor
On Tue, 2003-09-30 at 00:10, Steve Yalovitser wrote: Hello, I'd like to know if its possible to coopt the postgres storage subsystem to rely entirely on ram based structures, rather than disk. Any documentation or ideas would be appreciated. Just so you know, this isn't going to make the

Re: [HACKERS] Oracle/PostgreSQL incompatibilities

2003-10-03 Thread Tom Lane
Rainer Klute [EMAIL PROTECTED] writes: [ some good comments, but a few things I want to respond to ] + CREATE SCHEMA: Sometimes a schema created in PostgreSQL disappears if there is nothing in it. This is more than a bit hard to believe. Can you give an example? + CREATE

Re: [HACKERS] Oracle/PostgreSQL incompatibilities

2003-10-03 Thread Joshua D. Drake
+ CREATE SCHEMA: Sometimes a schema created in PostgreSQL disappears if there is nothing in it. This is more than a bit hard to believe. Can you give an example? We use schema's ALOT in our applications. I have yet to see this happen. + PostgreSQL does not support the NUMBER

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Joshua D. Drake
Yes, please. Please, please do not force all users to accept new features in stable trees. What if the feature does break compatibility with old features? What if it is truly a new feature? One example would be that we are considering reworking pg_dump/restore a bit to support batch uploads

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Doug McNaught
Joshua D. Drake [EMAIL PROTECTED] writes: Yes, please. Please, please do not force all users to accept new features in stable trees. What if the feature does break compatibility with old features? What if it is truly a new feature? One example would be that we are considering reworking

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Marc G. Fournier
On Fri, 3 Oct 2003, Joshua D. Drake wrote: Yes, please. Please, please do not force all users to accept new features in stable trees. What if the feature does break compatibility with old features? What if it is truly a new feature? One example would be that we are considering

Re: [HACKERS] minor view creation weirdness

2003-10-03 Thread Robert Treat
On Fri, 2003-10-03 at 00:50, Greg Stark wrote: Tom Lane [EMAIL PROTECTED] writes: I'd almost argue that we should change this message to an error I agree. Motion proposed and seconded; any objections out there? Uhm, doesn't the spec have anything to say about this? I mean,

Re: [HACKERS] back from Washington, still busy

2003-10-03 Thread Bruce Momjian
I am back and reading email now. --- Bruce Momjian wrote: I have returned from Washington, but one of my sons is in the hospital with a mild pneumonia. I think he is coming home tomorrow, so I will read all my email

Re: [HACKERS] minor view creation weirdness

2003-10-03 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: Uhm, doesn't the spec have anything to say about this? I mean, the view sure looks like standard SQL on its face. Well, you might read the spec as requiring the view column to have datatype CHAR(n) where n is the length of the unknown literal. I see in

[HACKERS] initdb

2003-10-03 Thread Andrew Dunstan
I now have a C implementation of initdb, which successfully runs with make check on my several linux machines, and compiles on Windows/MinGW too (can't run make check on Windows because we haven't got a native postgres yet - I'm going to create a small dummy Windows postgres that will let me

Re: [HACKERS] 7.4 status

2003-10-03 Thread Alvaro Herrera
While reviewing someone else's translation of pg_dump I noted that the phrase ACL list is used in a couple of places. However ACL stands for Access Control List, so the term ACL list seems redundant. Maybe it should be replaced with plain ACL? -- Alvaro Herrera (alvherre[a]dcc.uchile.cl) I

Re: [HACKERS] Strange behavior regarding temporary sequences

2003-10-03 Thread Tom Lane
Harald Fuchs [EMAIL PROTECTED] writes: test=# create temp sequence ts; CREATE SEQUENCE test=# create table tt1 (id int not null default nextval ('ts'), str varchar(255) not null); CREATE TABLE Although what PostgreSQL (7.3.4) does is perfectly reasonable, I find it somewhat unclean.

Re: [HACKERS] Thoughts on Maintaining 7.3

2003-10-03 Thread Josh Berkus
Joshua, et. al. Sorry for weighing in on this discussion so late; I've gotten behind on the Hackers digests, since there are some 90 messages a day. I don't see anything wrong with the idea of maintaining a 7.3 tree for bug fixes and testing if /contrib modules can be backported. Heck, I'm

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Bruce Momjian
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: I think what Tom is concerned about is that this hasn't been tested enough with big datasets. Also there a little loss of index pages but it's much less (orders of magnitude, I think) than what was before. This is because the index

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Bruce Momjian
Andrew Sullivan wrote: On Thu, Oct 02, 2003 at 02:15:33PM -0500, Bruno Wolff III wrote: It might be better to split into two different trees. One just gets bug fixes, the other gets bug fixes plus enhancements that won't require an initdb. Yes, please. Please, please do not force all

Re: [HACKERS] Dreaming About Redesigning SQL

2003-10-03 Thread Christopher Browne
After takin a swig o' Arrakan spice grog, [EMAIL PROTECTED] (Seun Osewa) belched out...: This is for relational database theory experts on one hand and imlementers of real-world alications on the other hand. If there was a chance to start again and design SQL afresh, for best

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Nigel J. Andrews
On Fri, 3 Oct 2003, Andrew Sullivan wrote: On Thu, Oct 02, 2003 at 02:15:33PM -0500, Bruno Wolff III wrote: It might be better to split into two different trees. One just gets bug fixes, the other gets bug fixes plus enhancements that won't require an initdb. Yes, please. Please, please

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Joshua D. Drake
If we are going to back-patch more aggressively, we _have_ to be sure that those back-patched releases have the same quality as all our other releases. I know that I am probably being semantic here but I in know way want to be more aggressive with back patching. My thoughts for 98% of things

Re: [HACKERS] 7.4 status

2003-10-03 Thread Peter Eisentraut
Alvaro Herrera writes: While reviewing someone else's translation of pg_dump I noted that the phrase ACL list is used in a couple of places. However ACL stands for Access Control List, so the term ACL list seems redundant. These kinds of redundancies are pretty common for the sake of clarity

[HACKERS] String freeze

2003-10-03 Thread Peter Eisentraut
I believe we have agreed to call a string freeze as of beta 4. That means that any string changes for the sake of prettiness are now to be avoided. (Here, strings means any strings that compose messages seen by the user.) This also includes adding new strings. String changes because of bug

Re: [HACKERS] is_superuser parameter creates inconsistencies

2003-10-03 Thread Peter Eisentraut
Bruce Momjian writes: Allow SET SESSION AUTHORIZATION to update the psql %n user display This already works. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister

Re: [HACKERS] Fix for PL/Tcl

2003-10-03 Thread Bruce Momjian
Jan Wieck wrote: Bruce Momjian wrote: Jan Wieck wrote: Just committed a small fix for PL/Tcl. I don't find it on the TODO, but you might want to add it to the release notes. * Fixed PL/Tcl's spi_prepare to accept full qualified type names in the parameter type list.

Re: [HACKERS] is_superuser parameter creates inconsistencies

2003-10-03 Thread Bruce Momjian
OK, item remvoed. --- Peter Eisentraut wrote: Bruce Momjian writes: Allow SET SESSION AUTHORIZATION to update the psql %n user display This already works. -- Peter Eisentraut [EMAIL PROTECTED]

Re: [HACKERS] updating INSTALL file

2003-10-03 Thread Bruce Momjian
Thanks. INSTALL file updated. Peter will do the final one, but at least we have a more current one in there now. --- Peter Eisentraut wrote: Bruce Momjian writes: I would rebuild it right now but the cross-links I

Re: [HACKERS] Oracle/PostgreSQL incompatibilities

2003-10-03 Thread Mark Kirkwood
I think he means that you can do this in oracle : CREATE TABLE test (id NUMBER); Oracle treats NUMBER as NUMBER(40) I think. This seems to be an example of Oracle making up standards as they go along - do we want to copy this sort of thing ? I usually just run a substitution of NUMBER(..) -

Re: [HACKERS] Dreaming About Redesigning SQL

2003-10-03 Thread Mike Mascari
Christopher Browne wrote: After takin a swig o' Arrakan spice grog, [EMAIL PROTECTED] (Seun Osewa) belched out...: This is for relational database theory experts on one hand and imlementers of real-world alications on the other hand. If there was a chance to start again and design SQL

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Though the new code will put empty index pages into the free-space map, will it also shrink the index file to remove those pages? If there are free pages at the end, yes --- but it won't move pages around. This is about the same story as for plain VACUUM

Re: [HACKERS] Thoughts on maintaining 7.3

2003-10-03 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Though the new code will put empty index pages into the free-space map, will it also shrink the index file to remove those pages? If there are free pages at the end, yes --- but it won't move pages around. This is about the same

Re: [HACKERS] [pgadmin-hackers] GPL code issue?

2003-10-03 Thread Adam H. Pendleton
Dave Page wrote: /* A Bison parser, made by GNU Bison 1.875. */ Given that this file appears to be produced *by* Bison, and given this exception: /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This

Re: [HACKERS] [SQL] HeapTuple-t_tableOid==0 after SPI_exec

2003-10-03 Thread Tom Lane
[EMAIL PROTECTED] writes: When HeapTuple is populated by SPI_exec(select * from foobar when id=667); tuple = SPI_tuptable-tvals[0] (id is PK and row with 667 exists) then tuple-t_tableOid is always 0. The result of a SELECT is never a raw table tuple, not even when it's a straight select *

Re: [HACKERS] [SQL] HeapTuple-t_tableOid==0 after SPI_exec

2003-10-03 Thread Tom Lane
[EMAIL PROTECTED] writes: are there gonna be changes in SPI or internal structs in 7.4? No more than usual ;-). You will need to recompile shared libraries, but (in theory) source code changes shouldn't be needed. You might want to think about upgrading elog() calls to ereport() though.