Re: [HACKERS] LIKE optimization in UTF-8 and locale-C

2007-03-22 Thread Dennis Bjorklund
ITAGAKI Takahiro skrev: I guess it works well for % but not for _ , the latter has to know, how many bytes the current (multibyte) character covers. Yes, % is not used in trailing bytes for all encodings, but _ is used in some of them. I think we can use the optimization for all of the server

Re: [HACKERS] Money type todos?

2007-03-20 Thread Dennis Bjorklund
Tom Lane skrev: The money type is considered deprecated. I was also under the impression it would be eventually removed. Why are we accumulating TODOs for it? Because doing the TODOs would remove the reasons for deprecating it. Whether it is actually ever going to disappear is not agreed upon.

Re: [HACKERS] OT: IRC nick to real world mapping

2007-02-13 Thread Dennis Bjorklund
Tom Lane skrev: Is there any cross-check on the correctness of this list? As have been said, there is a registration service that makes it harder to steal nicks. There is no guarantee that anyone who claim to be this or that really is who he say he is. On the other hand, a lot of us have b

Re: [HACKERS] savepoint improvements

2007-01-19 Thread Dennis Bjorklund
Merlin Moncure skrev: The missing piece of the puzzle is the ability to recover a failed transaction without issuing a full commit/rollback. This could be a new flavor of the savepoint command, commit command, or a new command. As a bonus, upon recovering the transaction you could snap an sql s

Re: [HACKERS] [PATCHES] setseed() doc

2006-09-04 Thread Dennis Bjorklund
Tom Lane skrev: setseed(dp) int - set seed for subsequent random() calls + set seed for subsequent random() calls (value between -1.0 and 1.0) Looking at the code, it would appear that the intended range is 0 to 1. Ok. What about the return value? The doc didn'

Re: [HACKERS] 8.2 features status

2006-08-03 Thread Dennis Bjorklund
David Fetter skrev: As far as big missing features go, here's a short list: * Windowing functions If we are to wish for things the window functions and a proper collation/locale support is what I miss the most. /Dennis ---(end of broadcast)

[HACKERS] max(*)

2006-05-26 Thread Dennis Bjorklund
Shouldn't SELECT max(*) FROM foo; give an error? Instead it's executed like SELECT max(1) FROM foo; Just like count(*) is executed as count(1). Something for the TODO or is it a feature? ps. I know it's not an important case since no one sane would try to calculate max(*), but still.

Re: [HACKERS] BEGIN inside transaction should be an error

2006-05-10 Thread Dennis Bjorklund
Tom Lane skrev: The SQL99 spec does say (in describing START TRANSACTION, which is the standard spelling of BEGIN) 1) If a statement is executed when an SQL-transaction is currently active, then an exception condition is raised: invalid transaction state - activ

Re: [HACKERS] BEGIN inside transaction should be an error

2006-05-10 Thread Dennis Bjorklund
Peter Eisentraut skrev: Am Mittwoch, 10. Mai 2006 10:10 schrieb Martijn van Oosterhout: You want to make a GUC that makes: BEGIN; BEGIN; Leave you with an aborted transaction? That seems like a singularly useless feature... If a command doesn't do what it is supposed to do, then it s

[HACKERS] BEGIN inside transaction should be an error

2006-05-09 Thread Dennis Bjorklund
Hi Yesterday I helped a guy on irc with a locking problem, he thought that locking in postgresql was broken. It turned out that he had a PHP function that he called inside his transaction and the function did BEGIN and COMMIT. Since BEGIN inside a transaction is just a warning what happend was th

Re: [HACKERS] -X flag in pg_dump

2006-01-26 Thread Dennis Bjorklund
On Thu, 26 Jan 2006, Dennis Bjorklund wrote: > What use is the -X flag to pg_dump? Let me just state before someone else does, that I don't want to remove -X. The question is if one should add new flags to it or simply just use the long form for new ones. -- /Dennis B

[HACKERS] -X flag in pg_dump

2006-01-26 Thread Dennis Bjorklund
What use is the -X flag to pg_dump. The code say that if one add a setting "feature" to -X then there should also be a flag "--feature". So we have for example: -X disable-triggers and --disable-triggers If all the -X flags come in a long form as well, then what use is the -X at all? Why

Re: [HACKERS] SHOW ALL output too wide

2005-11-26 Thread Dennis Bjorklund
On Sat, 26 Nov 2005, Bruce Momjian wrote: > See the discussion or really solo request by me for more feedback when > this change was made for 8.1: > > http://archives.postgresql.org/pgsql-patches/2005-06/msg00295.php > > Where were you when I asked? I do not work with postgresql like you

Re: [HACKERS] SHOW ALL output too wide

2005-11-25 Thread Dennis Bjorklund
On Fri, 25 Nov 2005, Bruce Momjian wrote: > > > Is there any use for SHOW except in interactive psql sessions? > > There certainly is. Imagine querying for timezone. Also remember that > pgadmin is a client application that is _not_ psql. I should have written SHOW ALL, that's the command outp

Re: [HACKERS] SHOW ALL output too wide

2005-11-25 Thread Dennis Bjorklund
On Fri, 25 Nov 2005, Bruce Momjian wrote: > > OTOH, what's the relationship between \show and Martijn's wide output > > patch? Maybe the problem can be solved in a different way. > > What does \show do that SHOW does not? It could do several things. For example \show could omit the description

Re: [HACKERS] NULL safe equality operator

2005-11-24 Thread Dennis Bjorklund
On Thu, 24 Nov 2005, Tom Lane wrote: > NOT (x IS DISTINCT FROM y) would be the standard-compliant way of > spelling that. That's the sql99 way. In sql2003 (but not in pg) one can also do X IS NOT DISTINCT FROM y -- /Dennis Björklund ---(end of broadcast)

[HACKERS] SHOW ALL output too wide

2005-11-22 Thread Dennis Bjorklund
I've noticed that in 8.1 the output of SHOW ALL includes a description column. This makes the output very wide which makes it hard to use from psql (I need to make the terminal window 164 characters wide to not get any line wrapping). I wish I would have noticed this before 8.0 was out and then I

Re: [HACKERS] Web page down (ad server)

2005-11-22 Thread Dennis Bjorklund
On Tue, 22 Nov 2005, Dennis Bjorklund wrote: > ps. The cvs server also seems to be down (postgresql.org). Forgot to say in the last mail, but this also works now. Seems like I should have waited some more before sending the mail. I waited 30 minutes but I should have waited 40... -- /Den

Re: [HACKERS] Web page down (ad server)

2005-11-22 Thread Dennis Bjorklund
On Tue, 22 Nov 2005, Magnus Hagander wrote: > > > Turns out it's related to the ads, so if I just adblock the > > ad server I can see the page just fine. Kind of bad it's > > needed however :-) > > > > I also tried to show the page in opera and it looks the same > > as in firefox. > > Inters

[HACKERS] Web page down (ad server)

2005-11-22 Thread Dennis Bjorklund
Something is wrong with the web site for me. I look at: http://www.postgresql.org/developer/ then this is what I see: http://www.zigo.dhs.org/~dennis/tmp/dev.png (everything is there except the main content that is not). Turns out it's related to the ads, so if I just adblock the ad server

Re: [HACKERS] MERGE vs REPLACE

2005-11-17 Thread Dennis Bjorklund
On Thu, 17 Nov 2005, Bruce Momjian wrote: > Unless you have a table lock, INSERT has to be before UPDATE, think > UPDATE, UPDATE (both fail), INSERT, INSERT. No matter what operation you start with you need a loop that try insert/update until one of them succeed like in this example: http://www

Re: [HACKERS] 8.0 -> 8.1 dump duplicate key problem?

2005-11-10 Thread Dennis Bjorklund
On Thu, 10 Nov 2005, Tom Lane wrote: > > When the dump gets to the point where the indexes/keys are built, the > > primary key fails to build due to duplicate key constraint failure. > > That's pretty bizarre. What's the datatype of the key column(s)? There was one guy on IRC that had the same

Re: [HACKERS] PG Killed by OOM Condition

2005-10-04 Thread Dennis Bjorklund
On Mon, 3 Oct 2005, Jeff Davis wrote: > involved, but I could be wrong. Is it possible to be hit by the OOM > killer if no applications use fork()? Sure, whenever the system is out of mem and the os can't find a free page then it kills a process. If you check the kernel log you can see if the o

Re: [HACKERS] roundoff problem in time datatype

2005-09-26 Thread Dennis Bjorklund
On Mon, 26 Sep 2005, Tom Lane wrote: > b) If SD is TIME WITHOUT TIME ZONE, then TV is SV, with > implementation-defined rounding or truncation if necessary. > > So it's "implementation-defined" what we do. Truncation would avoid the problem but of course loses some of t

Re: [HACKERS] roundoff problem in time datatype

2005-09-26 Thread Dennis Bjorklund
On Mon, 26 Sep 2005, Tom Lane wrote: > > Yes, and it can go up to 23:59:60.99 (depending on how many fractional > > seconds one want). > > That's an urban legend. There never have been, and never will be, two > leap seconds instituted in the same minute. We really should reject > anything

Re: [HACKERS] roundoff problem in time datatype

2005-09-26 Thread Dennis Bjorklund
On Mon, 26 Sep 2005, Tom Lane wrote: > > Actually, I think there is a case where 24:00 is a proper time. Isn't > > it used for adding leap seconds ? > > No, I think the usual notation for a leap-second is '23:59:60'. > We do allow 60 in the seconds field for this purpose. Yes, and it can go up

Re: [HACKERS] roundoff problem in time datatype

2005-09-26 Thread Dennis Bjorklund
On Sun, 25 Sep 2005, Tom Lane wrote: > Alternatively: why are we forbidding the value 24:00:00 anyway? Is > there a reason not to allow the hours field to exceed 23? One reason is because it's what the standard demand. Another is that it isn't a proper time, just like feb 31 isn't a proper date.

Re: [HACKERS] Attention PL authors: want to be listed in template

2005-09-08 Thread Dennis Bjorklund
On Thu, 8 Sep 2005, Tom Lane wrote: > I've committed the changes to have a system catalog in place of the > hard-wired table. In the initial commit, I listed only the languages > included in the core distribution. If I understand this correct you have created a system table that contain the sett

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Dennis Bjorklund
On Thu, 1 Sep 2005, Martijn van Oosterhout wrote: > Err, well. My thought was a certain group of type-suffix options would > be permitted (only zero or one at a time), for example: > >WITH TIME ZONE >WITHOUT TIME ZONE >CHARACTER SET xxx String types have 3 modifiers, the length, the

Re: [HACKERS] Call for 7.5 feature completion

2005-08-29 Thread Dennis Bjorklund
On Mon, 29 Aug 2005, Christopher Kings-Lynne wrote: > Oh, and 'select rowid, * from table' which returns special rowid column > that just incrementally numbers each row. In sql2003 there is a window function called ROW_NUMBER() that can be used to get numbers like that (one also need to specify

Re: [HACKERS] Call for 7.5 feature completion

2005-08-26 Thread Dennis Bjorklund
On Thu, 25 Aug 2005, Josh Berkus wrote: > > SavePoints be able to use within functions. ( I think this involves > > making procedures that execute outside of a transaction) > > Nope, supported in 8.0 for PL/pgSQL. Not sure about other languages. You can't use savepoints, you can trap error

Re: [HACKERS]

2005-08-10 Thread Dennis Bjorklund
On Wed, 10 Aug 2005, elein wrote: > implementation of the SQL-3 standard for multi-value NULLs > for PostgreSQL? SQL-3, that's what became sql99, isn't it? Anyway, there is nothing like what you explained in sql 99 nor sql 2003. The boolean type have a third value called UNKNOWN that is just a

Re: [HACKERS] #escape_string_warning = off

2005-08-02 Thread Dennis Bjorklund
On Tue, 2 Aug 2005, Jeff Davis wrote: > >>Does the SQL standard provide no way to have a NULL character in a > >>string constant? Is single-quote the only special character? > > > > I don't think it forbids you from using the null character. It's not like > > the strings are zero terminated. Som

Re: [HACKERS] #escape_string_warning = off

2005-08-02 Thread Dennis Bjorklund
On Mon, 1 Aug 2005, Jeff Davis wrote: > Does the SQL standard provide no way to have a NULL character in a > string constant? Is single-quote the only special character? I don't think it forbids you from using the null character. It's not like the strings are zero terminated. Some encodings migh

Re: [HACKERS] [BUGS] BUG #1745: Unable to delete data from the

2005-07-11 Thread Dennis Bjorklund
On Sun, 10 Jul 2005, Sivaraman K.G wrote: > The error in the log file is as follows : > > ERROR : xlog flush request 0/D17B00 is not satisfied --- > flushed only to > 0/C31ED0 > CONTEXT : writing block 0 of relation 17231/17232/17249 > WARNING : could not write

Re: [HACKERS] SQL99 - Nested Tables

2005-07-08 Thread Dennis Bjorklund
On Wed, 6 Jul 2005, Darren Alcorn wrote: > I was interested as to if there were plans to develop SQL99 nested > tables. Could you give an example of SQL99 nested tables? It might help us who don't know what the term stand for understand the issue. I've browsed through (bur not fully read) sql99 m

Re: [HACKERS] LGPL

2005-06-15 Thread Dennis Bjorklund
On Wed, 15 Jun 2005, Bruce Momjian wrote: > > K, that's what confused me as I got the impression it was ok to require > > LGPL libraries but not GPL. > > I think the answer isn't clear on that one. If that is not clear then what is the difference between a LGPL lib and a GPL one? To copy code fr

Re: [HACKERS] Backslash handling in strings

2005-05-31 Thread Dennis Bjorklund
On Tue, 31 May 2005, Tom Ivar Helbekkmo wrote: > ...or ^V followed by TAB, as per age-old tradition. :-) Right, I forgot about that one. One can also do other control characters instead of TAB by pressing CTRL-J and similar. Well, I just wanted to point out that it's possible. The main problem

Re: [HACKERS] Backslash handling in strings

2005-05-31 Thread Dennis Bjorklund
On Tue, 31 May 2005, Tom Lane wrote: > The case that convinced me we need to keep some sort of backslash > capability is this: suppose you want to put a string including a tab > into your database. Try to do it with psql: > t=> insert into foo values (' > Guess what: you won't get anywhere,

Re: [HACKERS] SO_KEEPALIVE

2005-05-16 Thread Dennis Bjorklund
On Mon, 16 May 2005, Tom Lane wrote: > On the other hand, it seems to me a client-side SO_KEEPALIVE would only > be interesting for completely passive clients (perhaps one that sits > waiting for NOTIFY messages?) A normal client will try to issue some > kind of database command once in awhile A

Re: [HACKERS] SO_KEEPALIVE

2005-05-16 Thread Dennis Bjorklund
On Mon, 16 May 2005, Tom Lane wrote: > > How come we don't set SO_KEEPALIVE in libpq? > > Is there any reason why we wouldn't want it on? > > Is there any reason we *would* want it on? The server-side keepalive > should be sufficient to get whatever useful impact it might have. Wouldn't the cl

[HACKERS] SO_KEEPALIVE

2005-05-16 Thread Dennis Bjorklund
How come we don't set SO_KEEPALIVE in libpq? Is there any reason why we wouldn't want it on? -- /Dennis Björklund ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] inclusions WAS: Increased company involvement

2005-05-04 Thread Dennis Bjorklund
On Wed, 4 May 2005, Joshua D. Drake wrote: > > Just how many incidents where people change the wrong files do you except. > > Maybe it's just easier to handle one such case every third year than to > > set up some system to prevent it. > > The number of incidents isn't the issue, the fact that

Re: [HACKERS] inclusions WAS: Increased company involvement

2005-05-04 Thread Dennis Bjorklund
On Wed, 4 May 2005, Marc G. Fournier wrote: > Just curious here ... but do any of the version control systems provide > "per directory user restrictions"? Where I could give CVS access to > Joshua, for instance, just to the plphp directory? Just how many incidents where people change the wrong

Re: [HACKERS] Feature freeze date for 8.1

2005-05-01 Thread Dennis Bjorklund
On Mon, 2 May 2005, Tom Lane wrote: > #1 Defend against loss of connectivity to client > > I claim that if you have a problem with #1 you ought to go discuss it > with some TCP hackers: you basically want to second-guess the TCP > stack's ideas about appropriate timeouts. Maybe you know what yo

Re: [HACKERS] Feature freeze date for 8.1

2005-05-01 Thread Dennis Bjorklund
On Sun, 1 May 2005 [EMAIL PROTECTED] wrote: > If a database wants to get bigger on the usage these settings like this > must be implemented. Lucky thing that postgresql is open source so you or anyone else that need it can implement or sponsor it. Postgresql gets as good as we make it and nothi

Re: [HACKERS] Feature freeze date for 8.1

2005-05-01 Thread Dennis Bjorklund
On Sun, 1 May 2005, Alvaro Herrera wrote: > Well, if process A loses the connection to the client, then the > transaction will be rolled back and other processes will be able to > continue. If the other end of a tcp/ip connection just disapears, for example if the network cable is cut off then in

Re: [HACKERS] Help - Urgent

2005-04-15 Thread Dennis Bjorklund
On Fri, 15 Apr 2005, ElayaRaja S wrote: > Hi, > I am unable to restart the PostgreSQL. I am using redhat Linux 9 > with postgresql 7.4.5. Unexpectedly due to ups problem my server was > shutdown once. After that i am unable to restart the server. > DETAIL: The data directory was initialized by

Re: [HACKERS] Should we still require RETURN in plpgsql?

2005-04-05 Thread Dennis Bjorklund
On Tue, 5 Apr 2005, Tom Lane wrote: > CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$ > BEGIN > sum := x + y; > prod := x * y; > RETURN; > END; > $$ LANGUAGE plpgsql; > > The RETURN statement is kinda useless in this example, but it is still > required, be

Re: [HACKERS] [BUGS] We are not following the spec for HAVING without

2005-03-14 Thread Dennis Bjorklund
On 14 Mar 2005, Greg Stark wrote: > > SELECT ROW_NUMBER() OVER bar AS num, > >x, > >avg(a) OVER bar, > >sum (a) OVER bar > > FROM foo > > WINDOW bar AS PARTITION BY x ORDER BY x, y, z; > > Note that as you said, this returns just as many records as are in the > original t

Re: [HACKERS] [BUGS] We are not following the spec for HAVING without

2005-03-14 Thread Dennis Bjorklund
On 14 Mar 2005, Greg Stark wrote: > select distinct on (x) x,y,z > order by x,y,z > > You can do the equivalent: > > select x, first(y), first(z) > order by x,y,z > group by x > > But you can also handle the more general case like: > > select x, first(y), first(z), avg(a), sum(s) > order b

Re: [HACKERS] Help me recovering data

2005-02-16 Thread Dennis Bjorklund
On 17 Feb 2005, Greg Stark wrote: > Gaetano Mendola <[EMAIL PROTECTED]> writes: > > > We do ~4000 txn/minute so in 6 month you are screewd up... > > Sure, but if you ran without vacuuming for 6 months, wouldn't you notice the > huge slowdowns from all those dead tuples before that? Most people

[HACKERS] French site with postgresql name

2005-01-22 Thread Dennis Bjorklund
Some french guy on IRC showed the site http://www.postgresql.fr/ that does not contain anything about postgresql. I don't speak french so I can't tell what the page is about. It looks linux related. This doesn't really belong on the -hackers list but I don't know where to send the info or even i

Re: [HACKERS] adding and compiling new code

2004-11-07 Thread Dennis Bjorklund
On Sun, 7 Nov 2004, Martha Chronopoulou wrote: > recompile the new source code that I added in some .c files. I suspect > that there must be a quicker way to compile those files than executing > the commands: ./configure, gmake, gmake install... . Could I use only > some Makefiles (the corre

Re: [HACKERS] charset/collation in values

2004-11-02 Thread Dennis Bjorklund
On Tue, 2 Nov 2004, Peter Eisentraut wrote: > For the theoretical specification of a collation, it might suffice to > know the character repertoire. But I think in practice, the > implementation of a collation will require knowing the specific > character encoding. The named entity that is calle

Re: [HACKERS] charset/collation in values

2004-11-02 Thread Dennis Bjorklund
On Tue, 2 Nov 2004, Peter Eisentraut wrote: > A collation implies a character set, so you only need to store one piece of > information anyway. No, a collation implies a character repertoire like UCS (unicode), it can apply to several character sets like UTF8 and UTF16. One can enumerate all co

Re: [HACKERS] charset/collation in values

2004-11-01 Thread Dennis Bjorklund
On Mon, 1 Nov 2004, Tom Lane wrote: > > I think the number of charset/collation combinations will be relatively > > few so perhaps it would be space efficient to maintain a table where > > each combination is given an oid and have string values store that > > rather than two separate oid's? >

[HACKERS] charset/collation in values

2004-10-31 Thread Dennis Bjorklund
I've looked into storing charset/collation in the string values. This means that we change varchar/text/BpChar to be structures that have a charset oid field and a collation oid field, the rest of the Datum is the string data. Coercability I think one don't need to put in the Datum and it can be s

Re: [HACKERS] Charset/collate support and function parameters

2004-10-31 Thread Dennis Bjorklund
On Sun, 31 Oct 2004, Tatsuo Ishii wrote: > I don't understand your point. Today we already use one length() > function for any charsets as Tom has already pointed out. We have one length function that inside do different things depending on the charset. If you want to add a charset and implement

Re: [HACKERS] Charset/collate support and function parameters

2004-10-31 Thread Dennis Bjorklund
On Sun, 31 Oct 2004, Tatsuo Ishii wrote: > I wonder what is the intention to allow such that syntax. It seems > it's just useless since we could make a function bar() which accepts > any charsets. One could override the behaviour of functions by adding a charset and a adding new definition of an

Re: [HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
On Sun, 31 Oct 2004, Tatsuo Ishii wrote: > > and now we could add functions that work with this charset > > > > CREATE FUNCTION bar (x VARCHAR(255) CHARACTER SET foo) > > > > What we are saying is that we don't want to be able to do this? > > Not sure we want to add above. Is it somethin

Re: [HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
On Sun, 31 Oct 2004, Tatsuo Ishii wrote: > > So you want to expand every string with 8 bytes (two oid's)? > > For me that seems to be the right way. I'm not sure if two oids are > the right solution but we need to store extra info in varlena > structure to support charset/collation anyway. In my

Re: [HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
On Sat, 30 Oct 2004, Tom Lane wrote: > > The alternative is storing the charset and collation inside each string. > > That seems like a too big price to pay, it belong in the type. > > No, the alternative you're proposing is too big a price to pay. So you want to expand every string with 8 byt

Re: [HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
On Sat, 30 Oct 2004, Tom Lane wrote: > > Are you worried about performance or is it the smaller change that you > > want? > > I'm worried about the fact that instead of, say, one length(text) > function, we would now have to have a different one for every > characterset/collation. This is not ab

Re: [HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
On Sat, 30 Oct 2004, Tom Lane wrote: > Why would we not keep this information right in the string values? We could, but then we would need to parse it every time. Storing it in a structured way seems like the database solution and at least as a user from the client side it makes sense. Are you

[HACKERS] Charset/collate support and function parameters

2004-10-30 Thread Dennis Bjorklund
I have a long term plan to implement charset support in pg and now when I have dropped the work on the timestamps, I've been looking into this subject. Today we store the max length of a string in the typmod field, but that has to be extended so we also store the charset and the collation of the s

[HACKERS] making pdf of docs

2004-10-26 Thread Dennis Bjorklund
Is there something wrong that makes it impossible to build the doc as a pdf? I started a build 4 hours ago, and it has still not finished (stuck at 100% CPU on my old 800Mhz 1G RAM machine). I know that openjade is very slow so for the first 3 hours I didn't worry. Now I'm starting to think that

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Josh Berkus wrote: > > The standard restrict the hour field to the interval 0-23, so there can > > never be any compare between for example '1 day 1 hour' and '25 hours'. > > This means that one can not add two intervals together to get a bigger > > one but that it would still

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Tom Lane wrote: > There are two classes of intervals. One class, called year-month > intervals, has an express or implied datetime precision that in- > cludes no fields other than YEAR and MONTH, though not both are > required. The other cla

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Josh Berkus wrote: > Hour/Minute/Second/ms > Day/Week > Month/Year This is embarrasing. I'm still a bit confused :-) The standard treat days as a separate entry, it does not assume that a day is 24 hours. It restricts the hour field to the interval 0-23 so one can never ha

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Josh Berkus wrote: > Hour/Minute/Second/ms > Day/Week > Month/Year And just when I pressed "send" on the previous mail I got the problem :-) -- /Dennis Björklund ---(end of broadcast)--- TIP 2: you can get off all lists at

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Josh Berkus wrote: > Dennis, > > > It doesn't discuss it. According to the spec a timestamp with time zone is > > a UTC value + a HH:MM offset from GMT. And intervals in the spec is either > > a year-month value or a day-time value. One can only compare year-month > > values

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-25 Thread Dennis Bjorklund
On Mon, 25 Oct 2004, Josh Berkus wrote: > Hmmm ... well, does the spec specifically prohibit DST, or just leave it > out? It doesn't discuss it. According to the spec a timestamp with time zone is a UTC value + a HH:MM offset from GMT. And intervals in the spec is either a year-month value or a

Re: [HACKERS] [BUGS] BUG #1290: Default value and ALTER...TYPE

2004-10-24 Thread Dennis Bjorklund
On Sun, 24 Oct 2004, Tom Lane wrote: > > (1) Accept the default's raw parsetree from the parser > > (2) Convert it to a cooked parsetree via transformExpr() > > (3) Add a coercion to the table's column type > > > Can't we save the cooked parsetree that we produced in #2? > > Not without an initd

Re: [HACKERS] [BUGS] BUG #1290: Default value and ALTER...TYPE

2004-10-24 Thread Dennis Bjorklund
On Sun, 24 Oct 2004, Neil Conway wrote: > (1) Accept the default's raw parsetree from the parser > (2) Convert it to a cooked parsetree via transformExpr() > (3) Add a coercion to the table's column type > > Can't we save the cooked parsetree that we produced in #2? One could even save the strin

[HACKERS] Daylight saving time

2004-10-24 Thread Dennis Bjorklund
I found a nice page about daylight saving time that I want to share: http://timeanddate.com/time/aboutdst.html Here are some fun quotes from the page: "Sometimes DST is used for longer periods than just one summer, as in the United States during World War II. From 3 Feb 1942 to 30 Sep 1945 m

Re: [HACKERS] Proposed TODO: CREATE .... WITH OWNER;

2004-10-23 Thread Dennis Bjorklund
On Sat, 23 Oct 2004, Tom Lane wrote: > Josh Berkus <[EMAIL PROTECTED]> writes: > > Dennis and I are hashing this out on IRC. The second option would be to > > simply put SET SESSION AUTHORIZATION statements before each and every > > statement in the pg_dump. This would make each statement "a

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Tom Lane wrote: > behavior. The spec says you can put a numeric-GMT-offset zone in and > get a numeric-GMT-offset zone out. We can do that and also support > named, possibly DST-aware zones. So if I understand you correctly you are planning to extend the current timestamp t

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Tom Lane wrote: > than having two different types (the idea of a GUC variable to choose > which one is selected by a given type name is just horrid). That is needed no matter what change you do if you want old programs that use the current timestamp with time zone to work. To

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Tom Lane wrote: > At bottom, what I want to be able to do is say > '2004-10-22 10:50:16.916003 America/New_York' Yes, that's what we said in the last mail and I think there is a value in having something like this. > universal time and not the timezone spec. Why shoul

Re: [HACKERS] SET SESSION SESSION AUTHORIZATION

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Tom Lane wrote: > backwards incompatibility for. Two major releases ago, we could have > considered it... Of course you shouldn't break backward compability over it. I thought it was new stuff in 8.0 hence my comment. -- /Dennis Björklund ---(end

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Tom Lane wrote: > As far as I can tell, Dennis is planning slavish adherence to the spec, > which will mean that the datatype is unable to cope effectively with > daylight-savings issues. So I'm unconvinced that it will be very > helpful to you for remembering local time in a

[HACKERS] SET SESSION SESSION AUTHORIZATION

2004-10-22 Thread Dennis Bjorklund
Is it just me or is this syntax very ugly? SET [ SESSION | LOCAL ] SESSION AUTHORIZATION username SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT so the parser accepts SET SESSION SESSION AUTHORIZATION DEFAULT; I know the SESSION/LOCAL part should be the same as the other SET comm

Re: [HACKERS] cvs problem

2004-10-22 Thread Dennis Bjorklund
On Fri, 22 Oct 2004, Heikki Linnakangas wrote: > The repository path was changed from /cvsroot/pgsql-server to > /cvsroot/pgsql some time ago. You'll have to re-checkout or fix the > CVS/Repository file in each subdirectory in your checked-out copy. Oh. Thanks! I should have tried, but in the p

[HACKERS] cvs problem

2004-10-22 Thread Dennis Bjorklund
I'm having problems with cvs: cvs diff: failed to create lock directory for `/cvsroot/pgsql-server' (/cvsroot/pgsql-server/#cvs.lock): No such file or directory cvs diff: failed to obtain dir lock in repository `/cvsroot/pgsql-server' cvs [diff aborted]: read lock failed - giving up -- /Dennis

Re: [HACKERS] Should libpq set close-on-exec flag on its socket?

2004-10-21 Thread Dennis Bjorklund
On Thu, 21 Oct 2004, Tom Lane wrote: > It was suggested to me off-list that libpq should do > "fcntl(fd, F_SETFD, FD_CLOEXEC)" on the socket connecting to the server. > This would prevent any child program from accidentally or maliciously > interfering with the connection. Either way that the lib

Re: [HACKERS] [BUGS] BUG #1290: Default value and ALTER...TYPE

2004-10-21 Thread Dennis Bjorklund
On Thu, 21 Oct 2004, Tom Lane wrote: > > Would it be possible to check the compatibility of a default value for > > the associated column? > > I think that would introduce as many problems as it would fix. AFAICS > the only way to make such a check is to evaluate the expression and see > what ha

Re: [HACKERS] timestamp with time zone a la sql99

2004-10-21 Thread Dennis Bjorklund
On Thu, 21 Oct 2004, Tom Lane wrote: > > I've made a partial implementation of a datatype "timestamp with time > > zone" as described in the sql standard. The current type "timestamptz" > > does not store the time zone as a standard one should do. > > I'm aware that there are aspects of the spe

[HACKERS] timestamp with time zone a la sql99

2004-10-21 Thread Dennis Bjorklund
I've made a partial implementation of a datatype "timestamp with time zone" as described in the sql standard. The current type "timestamptz" does not store the time zone as a standard one should do. So I've made a new type I've called timestampstdtz that does store the time zone as the standard d

Re: [HACKERS] Get rid of Money

2004-09-25 Thread Dennis Bjorklund
On Sun, 26 Sep 2004, Tom Lane wrote: > > Wouldn't pg 8.0 be a good release to get rid of the type Money? > > (1) there is not actually consensus to get rid of it. The doc seems to be clear about it. What does it provide that numeric doesn't? The only extra thing I know is a currency symbol that

[HACKERS] Get rid of Money

2004-09-25 Thread Dennis Bjorklund
Wouldn't pg 8.0 be a good release to get rid of the type Money? Maybe there is also other deprecated things that are suitable to get rid of in a .0 release. -- /Dennis Björklund ---(end of broadcast)--- TIP 2: you can get off all lists at once wi

Re: [HACKERS] Use of zlib

2004-09-25 Thread Dennis Bjorklund
On Sat, 25 Sep 2004, Bruce Momjian wrote: > I am confused. I just checked my backend binary and I don't see any > unusual libs required: > > $ ldd postgres > libz.so => /usr/lib/libz.so (0x2833f000) > libncurses.so.5 => /shlib/libncurses.so.5 (0x2834e000) > libdl.so

Re: [HACKERS] How to add locale support for each column?

2004-09-19 Thread Dennis Bjorklund
On 19 Sep 2004, Greg Stark wrote: > I've seen people describe here I think the standard behaviour will be nigh > useless anyway. From what I understand the standard has you declare a locale > per column. Yes, you can define a default collation for a column if you want to but more important you ca

Re: [HACKERS] How to add locale support for each column?

2004-09-19 Thread Dennis Bjorklund
On 19 Sep 2004, Greg Stark wrote: > don't think that's an argument for postgres to reimplement portions of the OS. > If the OS locale handling is slow on some OS's then postgres should just warn > its users that using locales on those OS's will be slow. > > In any case I suspect more than just th

Re: [HACKERS] subtransaction assert failure

2004-09-16 Thread Dennis Bjorklund
On Thu, 16 Sep 2004, Dennis Bjorklund wrote: > > Interestingly, I *cannot* recreate on the single CPU system and I cannot > > I've been trying to reproduce it on a single cpu system with fedora 2, > but no luck. I spook too soon. After having run it even more times I final

Re: [HACKERS] subtransaction assert failure

2004-09-16 Thread Dennis Bjorklund
On Thu, 16 Sep 2004, Gavin Sherry wrote: > Interestingly, I *cannot* recreate on the single CPU system and I cannot I've benn trying to reproduce it on a single cpu system with fedora 2, but no luck. If someone wants else to try, don't forget the configure flag --enable-cassert. -- /Dennis Bj

Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
On Tue, 14 Sep 2004, Peter Eisentraut wrote: > It's the same in SQL 99. I think you missed that most of the "direct > SQL" is specified in part 5 instead of part 2. In SQL 2003 they have > merged these parts. The relevant section for you in SQL 99 is 4.6.3 in > part 5. Good, that explains i

Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
On Tue, 14 Sep 2004, Alvaro Herrera wrote: > -- The following SQL-data statements: >[...] >. >[...] > > > The is in time defined as > , which in turn is a , which is > our SELECT statement. A lot of jumps in the grammar, but it's there. Nice. In sql99 there is only which is SEL

[HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
Is select a transaction starting statement according to the the sql specification? In the specification (sql99) there is a list of things that are and a list of things that are not, but I can't figure out which list a select query belongs to. Isn't that great :-) In postgresql it is implemented a

Re: [HACKERS] translations

2004-09-09 Thread Dennis Bjorklund
On Thu, 9 Sep 2004, Alvaro Herrera wrote: > > In libpq there was some files that was not scanned for translated strings > > and in scan.l there was a call to gettext() missing which made error > > messages into a mix of english and swedish (in my case). > > I see this problem too. I was about to

  1   2   3   >