Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Teodor Sigaev
So, I'm as sure as I can be right now. How can I check the .so files installed by the build? Do they reference an absolute path for their dependent .so files (postgres), or will they use ld.so.conf, which might then explain the problem. My ld.so.conf still points to the 8.0.2 version, as I've n

Re: [HACKERS] Accessing libq functions from UDF (shared library)

2005-11-08 Thread Richard Huxton
Gayathri TK wrote: Hi all, I am trying to create a User-defined function(UDF) which takes filename as input.. the function reads the file containig sql queries and executes them in background using libq functions (PGconnectDb, PQexec etc..). But when i tried creating a UDF using 'CREATE OR

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Teodor Sigaev
works fine contrib_regression=# select count(*) from test_data ; count --- 250 (1 row) contrib_regression=# create index test_data_index on test_data using gist( loc ); CREATE INDEX I've attached a small dump file that when I create an index on the table, it fails. It works on 2

[HACKERS] Accessing libq functions from UDF (shared library)

2005-11-08 Thread Gayathri TK
Hi all, I am trying to create a User-defined function(UDF) which takes filename as input.. the function reads the file containig sql queries and executes them in background using libq functions (PGconnectDb, PQexec etc..). I was able to sucessfully compile the code and create a shared librar

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Robert Creager
When grilled further on (Tue, 08 Nov 2005 11:12:04 -0500), Tom Lane <[EMAIL PROTECTED]> confessed: > Teodor Sigaev <[EMAIL PROTECTED]> writes: > > Layout of GIST_SPLITVEC struct has been changed from 8.0, I'm afraid that > > old > > .so is used. spl_(right|left)valid fields was added to GIST_SPL

Re: [HACKERS] Exclusive lock for database rename

2005-11-08 Thread daveg
On Tue, Nov 08, 2005 at 03:14:34PM -0600, Jim C. Nasby wrote: > On Sat, Nov 05, 2005 at 11:48:56AM +0100, Martijn van Oosterhout wrote: > > On Sat, Nov 05, 2005 at 10:47:30AM +0100, Jochem van Dieten wrote: > > > On 11/4/05, Jim C. Nasby wrote: > > > > > > > > I would argue that in cases like this

Re: [HACKERS] lc_numeric and decimal delimiter

2005-11-08 Thread Andrew Dunstan
Gavin Sherry wrote: Hi all, I am at OpenDBCon in Germany. People are complaining about floats/numerics not accepting German/European conventions for the delimiter point -- a comma. This is hard coded into the the numeric input parser but, naturally, we use strtod() in else where. I'm not sure

[HACKERS] compiling on windows with mingw

2005-11-08 Thread Gevik babakhani
I would like to compile the code on windows. I understand I need mingw. on the mingw site there are may packages to download and install.   Does anyone know which ones to download install in order to compile pg.   Thanx, Gevik.  

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Christopher Kings-Lynne
I also think the best non-compatible solution is to require non-numeric elements to be delimited (double quotes, configurable?), and use NULL unadorned to represent NULL. I think the ultimate solution should have null values represented by NULL... I mean NULL is NULL :) Chris

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Joe Conway
Jim C. Nasby wrote: On Tue, Nov 08, 2005 at 07:21:34PM -0500, Tom Lane wrote: ... the most straightforward thing to do is define an empty element as meaning a NULL. But this might be objected to on a couple of grounds: I just thought of another, potentially fatal objection: it's ambiguous whe

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
Also, Christopher - I was somewhat motivated to work on this by your recent comment about enums being the number one demand of migrating MySQL users, so I am mildly amused by your last sentence ;-) They're not mutually exclusive statements :) ---(end of broadcast)-

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Jim C. Nasby
On Tue, Nov 08, 2005 at 07:21:34PM -0500, Tom Lane wrote: > I wrote: > > ... the most straightforward thing to do is define an empty element > > as meaning a NULL. But this might be objected to on a couple of grounds: > > I just thought of another, potentially fatal objection: it's ambiguous > wh

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread mark
On Tue, Nov 08, 2005 at 07:21:34PM -0500, Tom Lane wrote: > I wrote: > > ... the most straightforward thing to do is define an empty element > > as meaning a NULL. But this might be objected to on a couple of grounds: > I just thought of another, potentially fatal objection: it's ambiguous > wheth

Re: [HACKERS] DTrace?

2005-11-08 Thread Jim C. Nasby
There is work going on to add dtrace support to FreeBSD, which I expect could migrate to the other BSDs as well. AFAIK *BSD is actually more popular among the developers than linux, so dtrace support could well happen. On Mon, Nov 07, 2005 at 02:29:12PM -0700, Aly Dharshi wrote: > From what I unde

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Tom Lane
I wrote: > ... the most straightforward thing to do is define an empty element > as meaning a NULL. But this might be objected to on a couple of grounds: I just thought of another, potentially fatal objection: it's ambiguous whether '{}'::text[] should be taken to mean an empty (zero-length) arra

Re: [HACKERS] Interval aggregate regression failure (expected seems

2005-11-08 Thread Tom Lane
Michael Paesold <[EMAIL PROTECTED]> writes: > Would you mind reporting this to RedHat Bugzilla? I believe a bug report > from you would have more weight then mine, because you actually > understand what's going on here. :-) Actually, given the thought that this may be an artifact of keeping an i

Re: [HACKERS] Troubles with array_ref

2005-11-08 Thread Tom Lane
"Cristian Prieto" <[EMAIL PROTECTED]> writes: > Well, anyway, this is the Stored Function I've been workin on; it simply > take an array and an integer just to return this item from the array; The > array could have any kind of elements so I declare it as anyarray (the > parameter) and anyelement (

[HACKERS] Troubles with array_ref

2005-11-08 Thread Cristian Prieto
Hi, sorry for the question but I still having serious troubles with the array_ref function. The function is not documented and I can't get a useful example inside the contrib directory. The function is defined as: Datum array_ref(ArrayType *array, int nSubscripts, int *indx, int

Re: [HACKERS] lc_numeric and decimal delimiter

2005-11-08 Thread Alvaro Herrera
Gavin Sherry wrote: > I am at OpenDBCon in Germany. People are complaining about floats/numerics > not accepting German/European conventions for the delimiter point -- a > comma. This is hard coded into the the numeric input parser but, > naturally, we use strtod() in else where. I'm not sure abou

Re: [HACKERS] Assert failure found in 8.1RC1

2005-11-08 Thread Robert Creager
On Tue, 08 Nov 2005 15:36:18 -0600 "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > Just to clarify, did it show the assert failure, the context switch > storm, or both? I didn't try for the assert after the patch. I was developing the test when I ran across the assert problem. It should trigger t

Re: [HACKERS] Assert failure found in 8.1RC1

2005-11-08 Thread Jim C. Nasby
On Tue, Nov 08, 2005 at 02:09:35PM -0700, Robert Creager wrote: > On Tue, 08 Nov 2005 14:09:58 -0600 > "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > > On Fri, Nov 04, 2005 at 08:46:27PM -0400, Marc G. Fournier wrote: > > > On Fri, 4 Nov 2005, Jim C. Nasby wrote: > > > For all the talk about "could

Re: [HACKERS] lc_numeric and decimal delimiter

2005-11-08 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > I am at OpenDBCon in Germany. People are complaining about floats/numerics > not accepting German/European conventions for the delimiter point -- a > comma. This is hard coded into the the numeric input parser but, > naturally, we use strtod() in else wher

Re: [HACKERS] Exclusive lock for database rename

2005-11-08 Thread Jim C. Nasby
On Sat, Nov 05, 2005 at 11:48:56AM +0100, Martijn van Oosterhout wrote: > On Sat, Nov 05, 2005 at 10:47:30AM +0100, Jochem van Dieten wrote: > > On 11/4/05, Jim C. Nasby wrote: > > > > > > I would argue that in cases like this (and 'this' means just about any > > > DDL, for starters) that it would

Re: [HACKERS] Interval aggregate regression failure (expected seems

2005-11-08 Thread Michael Paesold
Tom Lane wrote: I wrote: Michael Paesold <[EMAIL PROTECTED]> writes: I am definatly not going to use -march=pentium4 in any production system. Should I open a bug report with RedHat (gcc vendor)? Yeah, but they'll probably want a smaller test case than "Postgres fails its regression tests

Re: [HACKERS] Interval aggregate regression failure (expected seems

2005-11-08 Thread Michael Paesold
Gregory Maxwell wrote: On 07 Nov 2005 14:22:37 -0500, Greg Stark <[EMAIL PROTECTED]> wrote: IIRC, floating point registers are actually longer than a double so if the entire calculation is done in registers and then the result rounded off to store in memory it may get the right answer. Whereas

Re: [HACKERS] Assert failure found in 8.1RC1

2005-11-08 Thread Robert Creager
On Tue, 08 Nov 2005 14:09:58 -0600 "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 04, 2005 at 08:46:27PM -0400, Marc G. Fournier wrote: > > On Fri, 4 Nov 2005, Jim C. Nasby wrote: > > For all the talk about "couldn't it be part of regression", I haven't seen > > anyone submit a patch tha

[HACKERS] lc_numeric and decimal delimiter

2005-11-08 Thread Gavin Sherry
Hi all, I am at OpenDBCon in Germany. People are complaining about floats/numerics not accepting German/European conventions for the delimiter point -- a comma. This is hard coded into the the numeric input parser but, naturally, we use strtod() in else where. I'm not sure about the locale stuff a

Re: [HACKERS] Assert failure found in 8.1RC1

2005-11-08 Thread Jim C. Nasby
On Fri, Nov 04, 2005 at 08:46:27PM -0400, Marc G. Fournier wrote: > On Fri, 4 Nov 2005, Jim C. Nasby wrote: > For all the talk about "couldn't it be part of regression", I haven't seen > anyone submit a patch that would test for it ... since I believe both you > and Tom have both stated that "for

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Robert Creager
On Tue, 08 Nov 2005 11:12:04 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Teodor Sigaev <[EMAIL PROTECTED]> writes: > > Layout of GIST_SPLITVEC struct has been changed from 8.0, I'm afraid that > > old .so is used. spl_(right|left)valid fields was added to GIST_SPLITVEC. > > Does look a bit suspi

[HACKERS] [OTAnn] Feedback

2005-11-08 Thread shenanigans
I was interested in getting feedback from current mail group users.We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband.Roomity.com v 1.5 is a web 2.01 community webapp. Our newest version adds broadcast vide

Re: [HACKERS] Any advice about function caching?

2005-11-08 Thread Mark Cave-Ayland
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 07 November 2005 23:06 > To: Mark Cave-Ayland (External) > Cc: pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Any advice about function caching? (cut) > If you want per-query state, keep it in a data structur

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Tom Lane
Teodor Sigaev <[EMAIL PROTECTED]> writes: > Layout of GIST_SPLITVEC struct has been changed from 8.0, I'm afraid that old > .so is used. spl_(right|left)valid fields was added to GIST_SPLITVEC. Does look a bit suspicious ... Robert, are you *sure* you've got the right version of pgsphere linked i

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Tom Lane
Harald Fuchs <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> Unfortunately, that already has a meaning, and it's not that. > How about '{a, \N, b}'? That's valid syntax too, ie, adopting that syntax would break applications that are not broken today. Not to mention that it would be gratuitous

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Pollard, Mike
> and so the most straightforward thing to do is define an empty element > as meaning a NULL. But this might be objected to on a couple of grounds: Can you use a default to allow the user to specify the default value for an element? May look a little strange, though, if the user specifies a defa

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Tom Lane
"Pollard, Mike" <[EMAIL PROTECTED]> writes: > Can you use a default to allow the user to specify the default value for > an element? There's no mechanism for specifying a default value for individual elements within an array; and I've never heard one asked for. Certainly it's far less interesting

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> >>> it's great news. My personal opinion about formating NULL values >>> '{a, NULL, b}' -- longer, clean NULL is NULL >>> >> >> Unfortunately, that alr

Re: [HACKERS] plperl error when making 8.2dev CVS

2005-11-08 Thread Alvaro Herrera
Jaime Casanova wrote: > On 11/8/05, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Jaime Casanova wrote: > > > make[3]: *** No rule to make target `SPI.xs', needed by `SPI.c'. Stop. > > > > Did you delete that file? It's part of the sources. > > No... i didn't... and the file *is* in the plperl d

Re: [HACKERS] plperl error when making 8.2dev CVS

2005-11-08 Thread Jaime Casanova
On 11/8/05, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Jaime Casanova wrote: > > On 11/8/05, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > Jaime Casanova wrote: > > > > make[3]: *** No rule to make target `SPI.xs', needed by `SPI.c'. Stop. > > > > > > Did you delete that file? It's part of the

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Pollard, Mike
> and so the most straightforward thing to do is define an empty element > as meaning a NULL. But this might be objected to on a couple of grounds: Can you use a default to allow the user to specify the default value for an element? May look a little strange, though, if the user specifies a def

Re: [HACKERS] Enums again

2005-11-08 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Alvaro Herrera wrote: Huh, why not have the actual values in a separate catalog like pg_enumvalues or some such? Sure, could do that. I don't have strong feelings either way. I'd vote for the separate cata

Re: [Pgsphere-dev] Re: [HACKERS] SIGSEGV taken on 8.1 during

2005-11-08 Thread Robert Creager
When grilled further on (Tue, 08 Nov 2005 10:06:38 -0500), Tom Lane <[EMAIL PROTECTED]> confessed: > Does PGSphere itself have any regression tests? > > (Actually, running the contrib regression tests might be more relevant > than the main PG tests, since several contrib modules with GIST > opcla

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Teodor Sigaev
Tom Lane wrote: Robert Creager <[EMAIL PROTECTED]> writes: v->spl_right is address 0xbp - uninitialized? The whole struct looks pretty uninitialized, which immediately makes me wonder whether gdb has picked up a wrong value for "v". Try going down to a lower stack frame and seeing if you

Re: [HACKERS] Enums again

2005-11-08 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Alvaro Herrera wrote: >> Huh, why not have the actual values in a separate catalog like >> pg_enumvalues or some such? > Sure, could do that. I don't have strong feelings either way. I'd vote for the separate catalog instead of bloating pg_type.

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Tom Lane
Robert Creager <[EMAIL PROTECTED]> writes: > Is there any way I can do a without a > reconfigure/make/install of postgresql? The db is running on port > 5433, not the default of 5432. Sure, just "export PGPORT=5433" before "make installcheck". Doubt it will prove much, though, because the reg

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Robert Creager
When grilled further on (Tue, 08 Nov 2005 09:20:13 -0500), Tom Lane <[EMAIL PROTECTED]> confessed: > Robert Creager <[EMAIL PROTECTED]> writes: > > v->spl_right is address 0xbp - uninitialized? > > The whole struct looks pretty uninitialized, which immediately makes me > wonder whether gdb has pi

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Andrew Dunstan
Tom Lane wrote: "Pavel Stehule" <[EMAIL PROTECTED]> writes: it's great news. My personal opinion about formating NULL values '{a, NULL, b}' -- longer, clean NULL is NULL Unfortunately, that already has a meaning, and it's not that. What a pity. I don't see any alternative t

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > it's great news. My personal opinion about formating NULL values >'{a, NULL, b}' -- longer, clean NULL is NULL Unfortunately, that already has a meaning, and it's not that. regards, tom lane ---(end

Re: [Pgsphere-dev] Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Teodor Sigaev
Robert Creager wrote: Yes I did. Just did it again to make sure. Is there any way I can do a without a reconfigure/make/install of postgresql? The db is running on port 5433, not the default of 5432. export PGPORT=5433 If this is a PGSphere problem, should this conversation be continued

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Tom Lane
Robert Creager <[EMAIL PROTECTED]> writes: > v->spl_right is address 0xbp - uninitialized? The whole struct looks pretty uninitialized, which immediately makes me wonder whether gdb has picked up a wrong value for "v". Try going down to a lower stack frame and seeing if you can access the struct

Re: [HACKERS] Enums again

2005-11-08 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: In the catalog, pg_type would get a new column of type text[] that would hold the list of values, and typtype would have a new possible value of 'e' for enumeration. There might be other consequential changes too, but I think that would be mos

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Robert Creager
When grilled further on (Tue, 08 Nov 2005 15:13:32 +0300), Teodor Sigaev <[EMAIL PROTECTED]> confessed: > Hmm, did you recompile pg_sphere module for 8.1? Yes I did. Just did it again to make sure. Is there any way I can do a without a reconfigure/make/install of postgresql? The db is runnin

Re: [HACKERS] Enums again

2005-11-08 Thread Alvaro Herrera
Andrew Dunstan wrote: > In the catalog, pg_type would > get a new column of type text[] that would hold the list of values, and > typtype would have a new possible value of 'e' for enumeration. There > might be other consequential changes too, but I think that would be most > of it. Huh, why

Re: [HACKERS] Enums again

2005-11-08 Thread Andrew Dunstan
Christopher Kings-Lynne wrote: Maybe I missed it, but I didn't see any conclusion. If I want to design an Open Source system now that may be in beta in three to six months and I'd like to use enums, is this a good place to look? There's no way you're going to be using enums. I guess I'm w

Re: [HACKERS] plperl error when making 8.2dev CVS

2005-11-08 Thread Jaime Casanova
On 11/8/05, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Jaime Casanova wrote: > > Hi, > > > > i was trying to compile CVS using --with-plperl (perl installed is > > 5.6.1) and i get this error when make go inside plperl: > > fixing a bad typo in the message i try --with-perl (no --with-plperl like

Re: [HACKERS] Function with Variable number of parameters

2005-11-08 Thread Pavel Stehule
Are variable number of parameters supported in the new version of Postgres? Hello no, there isn't way for it without modification of parser. Or you can write somethink like create function a(init, int, int, int) .. create function a(int, int, int) returns .. return a($1,$2,$3, null) R

Re: [HACKERS] Function with Variable number of parameters

2005-11-08 Thread Alvaro Herrera
Edwin Ramirez wrote: > Hello, > > Are variable number of parameters supported in the new version of Postgres? No, but overloading continues to be supported (which means you can create one function for each number of parameters). Functions with rowtype arguments are supported as well. True varia

Re: [HACKERS] PGXS on VPATH?

2005-11-08 Thread Fabien COELHO
Dear Alvaro, sorry for this late response. Is PGXS on VPATH builds supported? Probably not in the way you're thinking. IIRC pgxs.mk explicitly resets VPATH, and I think it has to do that because any VPATH embedded in Makefile.global would represent what was done at the time of building the

[HACKERS] Function with Variable number of parameters

2005-11-08 Thread Edwin Ramirez
Hello, Are variable number of parameters supported in the new version of Postgres? -esr- ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] Is there any other way to compile pgsql without gmake

2005-11-08 Thread Alvaro Herrera
Sreejesh O S wrote: > I want to install PostgreSQL 8.1 on FreeBSD 4.8-RELEASE . > > I can't make it with make command. > > make > You must use GNU make to build PostgreSQL. > *** Error code 1 > > Do I install gmake ? Yes. -- Alvaro Herrerahttp://www.CommandProm

Re: [HACKERS] plperl error when making 8.2dev CVS

2005-11-08 Thread Alvaro Herrera
Jaime Casanova wrote: > Hi, > > i was trying to compile CVS using --with-plperl (perl installed is > 5.6.1) and i get this error when make go inside plperl: > > make[3]: *** No rule to make target `SPI.xs', needed by `SPI.c'. Stop. Did you delete that file? It's part of the sources. -- Alvar

Re: [HACKERS] SIGSEGV taken on 8.1 during dump/reload

2005-11-08 Thread Teodor Sigaev
Hmm, did you recompile pg_sphere module for 8.1? Robert Creager wrote: When grilled further on (Mon, 7 Nov 2005 22:25:17 -0700), Robert Creager <[EMAIL PROTECTED]> confessed: Sorry, I'll just trickle out the information. tassiv=# \d catalog_ra_decl_index Index "public.catalog_ra_decl_index"

Re: [HACKERS] parameterized limit statements

2005-11-08 Thread Csaba Nagy
On Mon, 2005-11-07 at 18:43, Tom Lane wrote: [snip] > If it doesn't have a value for the parameter, it'll assume 10% of table > rows, which is what it's done for a long time if the LIMIT isn't > reducible to a constant. Is 10% a reasonable guess here ? Here we use limit in combination with prepar

[HACKERS] Is there any other way to compile pgsql without gmake

2005-11-08 Thread Sreejesh O S
I want to install PostgreSQL 8.1 on  FreeBSD 4.8-RELEASE . I can't make it with make command. make You must use GNU make to build PostgreSQL. *** Error code 1 Do I install gmake ?

Re: [HACKERS] Copy From CSV feature request?

2005-11-08 Thread Richard Huxton
mike wrote: I import some of my data into my postgres database, win32 platform, via the COPY table FROM with CSV. My CSV file is created from a Crystal Report (v.9). I run the report and have Crystal export the results into a CSV file (using the default settings). I have some data which looks

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Pavel Stehule
Hello, it's great news. My personal opinion about formating NULL values '{a,"",b} -- wrong, "" means empty string, isn't null '{a,,b} ' -- ok, maybe not unique, '{a, NULL, b}' -- longer, clean NULL is NULL '{a, "NULL", b}' -- "NULL" is not null varchar 'NULL' Flags for array? Maybe bi

Re: [HACKERS] Problems with index-scan on regexp in 8.1

2005-11-08 Thread Lars Kanis
Am Montag, 7. November 2005 14:13 schrieb Martijn van Oosterhout: > On Mon, Nov 07, 2005 at 07:50:20AM +0100, Lars Kanis wrote: > > We're using Postgres 8.0.2 on SuSE10.0 (64-Bit). Tests on 8.1 beta 4 have > > shown no problems but this one: > > > > SELECT * FROM mitglieder WHERE lower(vorname::t

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
So, instead of using enums for order states or originating system, I'll user numbers or text? Or implement lookup tables ? Use a text field and a CHECK constraint if you have just a couple of states, and a lookup table if you have many. Always use a lookup table if you plan on adding new stat

Re: [HACKERS] Enums again

2005-11-08 Thread Kaare Rasmussen
Just don't use enums - they're awful. In general? So, instead of using enums for order states or originating system, I'll user numbers or text? Or implement lookup tables ? ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, ple

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
Maybe I missed it, but I didn't see any conclusion. If I want to design an Open Source system now that may be in beta in three to six months and I'd like to use enums, is this a good place to look? There's no way you're going to be using enums. I guess I'm wondering about the kit going into Pg