Re: [HACKERS] SELECT blocking on ALTER TABLE ADD FOREIGN KEY
On Thu, Jun 12, 2003 at 06:23:12PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: Is there any ALTER that would require blocking selects? DROP INDEX, for certain. Sure, but that's usually trivially fast. Even stuff like drop and rename should be protected by versioning, no? No. System-catalog changes are always READ COMMITTED mode. Yeah, so the catalog changes shouldn't be visible to anyone until after the ALTER is complete, right? Even if a transaction is set to read uncommitted, I assume it will always read only committed data from the catalogs... -- Jim C. Nasby (aka Decibel!)[EMAIL PROTECTED] Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: Where do you want to go today? Linux: Where do you want to go tomorrow? FreeBSD: Are you guys coming, or what? ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] SELECT blocking on ALTER TABLE ADD FOREIGN KEY
On Mon, Jun 16, 2003 at 01:17:38 -0500, Jim C. Nasby [EMAIL PROTECTED] wrote: Yeah, so the catalog changes shouldn't be visible to anyone until after the ALTER is complete, right? Even if a transaction is set to read uncommitted, I assume it will always read only committed data from the catalogs... Postgres doesn't have a read uncommitted mode for transactions. ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] Groups and roles
Christopher Kings-Lynne wrote: 1. Do we want to someday allow groups to have groups as members? (Seems reasonable to me.) I agree. I think the other requirement of roles is that they are able to own objects. ie. we need to allow groups to own objects. This would also solve the problem that information_schema views will show only owned objects. If objects are created as owned by a proper role, not only the creator will be able to use these views. Regards, Andreas ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] sql_ascii
Dennis Björklund writes: Why do we have SQL_ASCII? It gives a simple default behavior for people who don't want to deal with character set issues. I could understand it if we only could store 7-bit strings there. But SQL_ASCII lets you store 8-bit values. Should I understand SQL_ASCII simply as 8-bit strings of unknown charset? Something like that. On the client side you could also understand it as whatever the server is using, as long as that's single-byte. On the server side it's 7-bit clean and 8-bit sometimes-clean. It's not pretty. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] client encodings
Dennis Björklund writes: However, if you want to produce a utf-8 file, how should that work with respect to gettext()? If the message catalog is in latin1 then we need to know that and convert that into utf-8. I don't think all gettext implementations support automatic character set conversion. We might have to roll our own sometime, but for now it's not an option. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [HACKERS] enumeration type?
Christopher Kings-Lynne [EMAIL PROTECTED] writes: MySQL made up ENUMs out of whole cloth...they should copy our way, not us theirs... ENUMs do seem to have some advantages in convenience though. And providing them or something closely comparable would ease porting from MySQL ... which is an important consideration in our plan for world domination ;-) In short I wouldn't object to having this on the TODO list. It's just not real high priority in my mind. regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] SELECT blocking on ALTER TABLE ADD FOREIGN KEY
Jim C. Nasby [EMAIL PROTECTED] writes: On Thu, Jun 12, 2003 at 06:23:12PM -0400, Tom Lane wrote: Even stuff like drop and rename should be protected by versioning, no? No. System-catalog changes are always READ COMMITTED mode. Yeah, so the catalog changes shouldn't be visible to anyone until after the ALTER is complete, right? The point is that they become visible *immediately* when the ALTER commits; if the other transaction is in the midst of some operation on the table, it's likely to fail badly. Locking is what we have to do to prevent that. An example of the sort of problem I'm afraid of is that any change in the tuple descriptor of a table (adding or renaming a column, flipping the NOT NULL constraint, etc) will cause replacement of the tuple descriptor in the table's relcache entry as soon as the other backend notices the cache-inval message from the altering backend. This would break any code that has a pointer to the tuple descriptor. Now with sufficiently draconian programming rules we could probably avoid holding references to cached tuple descriptors anywhere ... but it would be mighty fragile, and mistakes would lead to failures that would be nigh impossible to replicate or debug. Right now the rule is you can use a relcache entry as long as you have some kind of lock on the relation. This is relatively easy to ensure. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] 7.3.3 COMPILE FAILURE: pg_dump (fwd)
Where did getopt_long() come from and why is there no header file to go along with it? Larry Rosenman writes: --On Saturday, June 07, 2003 10:42:31 -0500 Larry Rosenman [EMAIL PROTECTED] wrote: cc -O -g -I../../../src/interfaces/libpq -I../../../src/include -I/usr/local/include -DBINDIR=\/usr/local/pgsql/bin\ -c -o pg_dump.o pg_dump.c UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled UX:acomp: ERROR: pg_dump.c, line 192: incomplete struct/union/enum option: long_options UX:acomp: ERROR: pg_dump.c, line 193: too many struct/union initializers UX:acomp: ERROR: pg_dump.c, line 193: cannot recover from previous errors gmake[3]: *** [pg_dump.o] Error 1 gmake[3]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src/bin/pg_dump' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src/bin' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src' gmake: *** [all] Error 2 $ on UnixWare 7.1.3 modifying pg_config.h to NOT define GETOPT_LONG fixes it. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] 7.3.3 COMPILE FAILURE: pg_dump (fwd)
--On Monday, June 16, 2003 16:51:04 +0200 Peter Eisentraut [EMAIL PROTECTED] wrote: Where did getopt_long() come from and why is there no header file to go along with it? I haven't had a chance to find this, I'll try tonight. You are welcom to use your peter_e account on lerami.lerctr.org if you'd like. LER Larry Rosenman writes: --On Saturday, June 07, 2003 10:42:31 -0500 Larry Rosenman [EMAIL PROTECTED] wrote: cc -O -g -I../../../src/interfaces/libpq -I../../../src/include -I/usr/local/include -DBINDIR=\/usr/local/pgsql/bin\ -c -o pg_dump.o pg_dump.c UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled UX:acomp: ERROR: pg_dump.c, line 192: incomplete struct/union/enum option: long_options UX:acomp: ERROR: pg_dump.c, line 193: too many struct/union initializers UX:acomp: ERROR: pg_dump.c, line 193: cannot recover from previous errors gmake[3]: *** [pg_dump.o] Error 1 gmake[3]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src/bin/pg_dump' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src/bin' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/home/ler/pg-dev/postgresql-7.3.3/src' gmake: *** [all] Error 2 $ on UnixWare 7.1.3 modifying pg_config.h to NOT define GETOPT_LONG fixes it. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] [INTERFACES] Some quick notes about extending libpq for new protocol
Peter Eisentraut [EMAIL PROTECTED] writes: In the old protocol there used to be support for more then one error arriving, in which case they were concatenated. What is happening with that? That still works with respect to libpq's internally-generated errors, which is as far as I know the only case that the concatenation was actually useful for. Shouldn't the position be available as a separate field, so client programs can do their own highlighting or whatnot? Yes, it is. The question here is what the backwards-compatible PQerrorMessage() call should produce. Do you think position should get left out of that? My thought was that the terse form should carry everything that is likely to fit on one line, and position would usually fit on the same line with syntax error. Also, an app that is using PQerrorMessage() rather than constructing its own error message from the individual fields is likely not gonna do anything as helpful as highlighting ... One more thing: It has always annoyed me that PQerrorMessage() returns the text with a trailing newline. Since we now redefined newlines to be paragraph breaks, should this be changed (in a backward-compatible fashion)? The backwards-compatible part *is* that PQerrorMessage() returns text with a trailing newline. If you fetch the individual fields, they don't have trailing newlines. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
[HACKERS] Multi Table Indexes
Greetings Hackers- I have an interest in developing better OO support in PostgreSQL, and have done some preliminary research in the archives and TODO list. It appears that this topic hasn't gotten much traffic in a while, so I thought I'd test the waters. What do the gurus here think of implementing multi-table indexes as a vehicle toward better inheritance of keys? Perhaps someone here who is more familiar with the code tree can comment on the magnitude of this addition. Thanks, -Ben Minshall Benjamin Minshall [EMAIL PROTECTED] Senior Developer -- Intellicon, Inc. http://www.intellicon.biz/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [HACKERS] Pre-allocation of shared memory ...
On Thu, Jun 12, 2003 at 10:10:02PM -0400, Bruce Momjian wrote: Tom Lane wrote: It is bad to hang the system, but if it reports swap failure, at least the admin knows why it failed, rather than killing random processes. I wonder if it might be better to suspend whatever process is trying to allocate/write to too much memory. At least then you have some chance of keeping the system up (obviously you'd need to leave some amount free so you could login to the box to fix things). -- Jim C. Nasby (aka Decibel!)[EMAIL PROTECTED] Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: Where do you want to go today? Linux: Where do you want to go tomorrow? FreeBSD: Are you guys coming, or what? ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] Pre-allocation of shared memory ...
On Fri, Jun 13, 2003 at 12:41:28PM -0400, Bruce Momjian wrote: Of course, if you exceed swap, your system hangs. Are you sure? I ran out of swap once or came damn close, due to a cron job gone amuck. My clue was starting to see lots of memory allocation errors. After I fixed what was blocking all the backed-up cron jobs, the machine ground to a crawl (mmm... system load of 400+ on a dual PII-375), and X did crash (though I think that's because I tried switching to a different virtual console), but the machine stayed up and eventually worked through everything. -- Jim C. Nasby (aka Decibel!)[EMAIL PROTECTED] Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: Where do you want to go today? Linux: Where do you want to go tomorrow? FreeBSD: Are you guys coming, or what? ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] PostgreSQL and Windows
We have a similar question about upcoming Windows native release: Is it going to be multithreaded or one process per connection like on cygwin? -Original Message- From: P.M [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 11:10 PM To: PostGreSQL mailing list Subject: [HACKERS] PostgreSQL and Windows Hi, I would like to know if in the Windows installer version, you still plan to use cygwin to setup PostgreSQL ? If no, how do you setup files and parameters ? Moreover, What are the traps to pay attention when we install PostgreSQL on Windows ? tia, X04001 __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] PostgreSQL and Windows
Yurgis Baykshtis wrote: We have a similar question about upcoming Windows native release: Is it going to be multithreaded or one process per connection like on cygwin? One connection per process. The only multithreaded Win32 is SRA's commercial product. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[HACKERS] Errors compiling hba.c in current CVS
I get the errors below when compiling on a RH 6.1 system. I used the following config paramters: ./configure --prefix=/usr/local/pgsql --enable-integer-datetimes --with-pgport=5433 hba.c: In function `parse_hba': hba.c:590: structure has no member named `ss_family' hba.c:659: structure has no member named `ss_family' hba.c:691: structure has no member named `ss_family' hba.c: In function `ident_inet': hba.c:1210: structure has no member named `ss_family' hba.c: In function `authident': hba.c:1461: structure has no member named `ss_family' hba.c:1467: warning: unreachable code at beginning of switch statement make[3]: *** [hba.o] Error 1 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] SOLUTION: Insert a Euro symbol as UTF-8 from a latin1 charset.
On Friday 13 June 2003 17:28, Roland Glenn McIntosh wrote: This is my solution / bug report / RFC cross-posted from [GENERAL] regarding insertion of hexadecimal characters from the command line. --- Okay. I have NO IDEA why this works. If someone could enlighten me as to the math involved I'd appreciate it. First, a little background: The Euro symbol is unicode value 0x20AC. UTF-8 encoding is a way of representing most unicode characters in two bytes, and most latin characters in one byte. The only way I have found to insert a euro symbol into the database from the command line psql client is this: INSERT INTO mytable VALUES('\342\202\254'); I don't know why this works. In hex, those octal values are: E2 82 AC My apologies, I forgot to mention converting to UTF-8 in my original reply. Additionally, according to the psql online documentation and man page: Anything contained in single quotes is furthermore subject to C-like substitutions for \n (new line), \t (tab), \digits, \0digits, and \0xdigits (the character with the given decimal, octal, or hexadecimal code). Those digits *should* be interpreted as decimal digits, but they aren't. The man page for psql is either incorrect, or the implementation is buggy. The docs are easy to misunderstand if you are scanning them in a hurry. This section is referring to substitutions in psql's own meta commands, not SQL statements, e.g. this: \echo '\0xe2\0x82\0xac' will display the Euro sign (assuming your terminal can print it). Ian Barwick [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[HACKERS] Multi-Table Indexes
Greetings Hackers- I have an interest in developing better OO support in PostgreSQL, and have done some preliminary research in the archives and TODO list. It appears that this topic hasn't gotten much traffic in a while, so I thought I'd test the waters. What do the gurus here think of implementing multi-table indexes as a vehicle toward better inheritance of keys? Perhaps someone here who is more familiar with the code tree can comment on the magnitude of this addition. Thanks, -Ben Minshall ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[HACKERS] Table functions and AS clauses ...
Currently I am able to do ... SELECT dblink_oraconnect('scott/[EMAIL PROTECTED]'); SELECT * FROM dblink_ora('SELECT ename, sal FROM emp') AS (ename text, sal text); The problem is: If I wanted to do a SELECT * FROM dblink_ora('SELECT * FROM emp'); It won't work because dblink_ora returns SETOF RECORD. If could define a type representing the remote data structure. However, my question is: Is there a way to implement it in a way that does not depend on the remote data structure? Is there a way to get rid of the AS without having to define a type? Maybe somebody can provide me some information about that or point to me to some material about this topic. If we had a solution for that, we could go ahead and do some basic OLAP operations. Imagine we had a cube generated by the means of SQL. We could do SELECT * FROM some_olap_operation(cube, ...); without worrying about the elements in a certain dimension which should be displayed in the x-axis (as columns). If there was a nice workaround or a solution I'd be really happy :). Regards, Hans -- Cybertec Geschwinde u Schoenig Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria Tel: +43/2952/30706; +43/664/233 90 75 www.cybertec.at, www.postgresql.at, kernel.cybertec.at ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Multi-Table Indexes
Seems multi-table indexes are the only solution for various inheritance problems, and I seem to remember even a non-inheritance case that could use it, but I can't remember what it was. --- Benjamin Minshall wrote: Greetings Hackers- I have an interest in developing better OO support in PostgreSQL, and have done some preliminary research in the archives and TODO list. It appears that this topic hasn't gotten much traffic in a while, so I thought I'd test the waters. What do the gurus here think of implementing multi-table indexes as a vehicle toward better inheritance of keys? Perhaps someone here who is more familiar with the code tree can comment on the magnitude of this addition. Thanks, -Ben Minshall ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] sa_family_t in cygwin compile of cvs + regression failure
On Sun, Jun 15, 2003 at 04:54:21PM +0100, deststar wrote: On cygwin sa_family_t was undeclared, adding the following line: typedef unsigned short sa_family_t; to both: src/port/getaddrinfo.c src/include/libpq/pqcomm.h Isn't the attached or fixing Cygwin itself a better approach? seemed to compile ok but with make check there was one regression failure in test privileges (doesn't look realted, but I'm not sure). I have also observed similar problems when I (used to) use make check myself. This test passes under make installcheck. BTW, because of the above and the following (from the Cygwin PostgreSQL README): 1. make check can generate spurious regression test failures due to overflowing the the listen() backlog queue which generates connection refused errors. Note that make installcheck does not have this problem since it runs all tests sequentially instead of in large concurrent groups. I no longer use make check even though make installcheck is much less convenient. Also included for ease of testing is a patch sepratly sent to patches for ecpg. Thanks for the patch! Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 Index: src/include/port/cygwin.h === RCS file: /projects/cvsroot/pgsql-server/src/include/port/cygwin.h,v retrieving revision 1.3 diff -u -p -r1.3 cygwin.h --- src/include/port/cygwin.h 22 May 2003 17:20:28 - 1.3 +++ src/include/port/cygwin.h 16 Jun 2003 17:20:19 - @@ -21,3 +21,5 @@ typedef unsigned char slock_t; #else #define DLLIMPORT __declspec (dllimport) #endif + +typedef unsigned short sa_family_t; ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[HACKERS] confused with encodings
Tatsuo, recently I tried to understand why I can't get sorting works properly with cyrillic characters in UTF8 datbase. I figure out the reason of my confusion - I thought I could specify different encodings for different databases and these encodings will be used in text operations (sort, upper,lower), not just for conversion. But, actually, the only encoding is important for text operations - the one specified with 'initdb' command ! Is't true ? If so, it's a big issue :) After I created separate storage for unicode (initdb -E utf8) and restarted postmaster I got success with 'order by', but upper(), lower() functions still fails. Regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] enumeration type?
Tom Lane writes: ENUMs do seem to have some advantages in convenience though. And providing them or something closely comparable would ease porting from MySQL ... which is an important consideration in our plan for world domination ;-) Now that domains have check constraints, I think enumerations can be easily created without having to invent nonstandard features. There's also the advantage that you can create domains out of data types other than text. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[HACKERS] Domains and function arguments
It seems that there are still a few problems with the resolution of functions that have domains as arguments. Take these two domains: create domain testdomain1 as int; create domain testdomain2 as int; Take these two functions: create function foofunc(testdomain1) returns int as 'select 1' language sql; create function foofunc(testdomain2) returns int as 'select 2' language sql; Calling foofunc(1) fails with the usual error message. Take these two functions: create function foofunc(testdomain1) returns int as 'select 1' language sql; create function foofunc(int) returns int as 'select 2' language sql; Calling foofunc(1) calls the second function. This is wrong, because int and testdomain2 are equivalent types, so the behavior should be identical to the above. Take these two functions: create function foofunc(testdomain1) returns int as 'select 1' language sql; create function foofunc(bigint) returns int as 'select 2' language sql; Calling foofunc(1) fails with the usual error message. This is wrong, because testdomain1 is equivalent to int, and had we written foofunc(int), that's the one that would have been called, in preference to foofunc(bigint). The SQL standard does not allow functions to have domains as arguments. Semantically, they have a point. Domains are not distinct types from their base types, just different ranges within those types, and the choice of function should just depend on the nature of the data, not in which range it was declared to fall. I think we should consider following the standard. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] 7.3.3 COMPILE FAILURE: pg_dump (fwd)
Larry Rosenman writes: Where did getopt_long() come from and why is there no header file to go along with it? I haven't had a chance to find this, I'll try tonight. You are welcom to use your peter_e account on lerami.lerctr.org if you'd like. I'm more interested to know how you got getopt_long() onto your system, so that we don't start designing detection mechanisms based on broken/incomplete installations. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] 7.3.3 COMPILE FAILURE: pg_dump (fwd)
I just did an upgrade of Unixware to 7.1.3 up1 with the upgrade pack, to the best of my knowledge. I need to look further at it. --On Monday, June 16, 2003 21:00:44 +0200 Peter Eisentraut [EMAIL PROTECTED] wrote: Larry Rosenman writes: Where did getopt_long() come from and why is there no header file to go along with it? I haven't had a chance to find this, I'll try tonight. You are welcom to use your peter_e account on lerami.lerctr.org if you'd like. I'm more interested to know how you got getopt_long() onto your system, so that we don't start designing detection mechanisms based on broken/incomplete installations. -- Peter Eisentraut [EMAIL PROTECTED] -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [HACKERS] Errors compiling hba.c in current CVS
On Mon, Jun 16, 2003 at 11:47:58 -0500, Bruno Wolff III [EMAIL PROTECTED] wrote: I get the errors below when compiling on a RH 6.1 system. I used the following config paramters: ./configure --prefix=/usr/local/pgsql --enable-integer-datetimes --with-pgport=5433 hba.c: In function `parse_hba': hba.c:590: structure has no member named `ss_family' hba.c:659: structure has no member named `ss_family' hba.c:691: structure has no member named `ss_family' hba.c: In function `ident_inet': hba.c:1210: structure has no member named `ss_family' hba.c: In function `authident': hba.c:1461: structure has no member named `ss_family' hba.c:1467: warning: unreachable code at beginning of switch statement make[3]: *** [hba.o] Error 1 I looked into this a bit more and found ss_family is defined in pqcomm.h which is included in auth.c which compiles and not in either hba.c or ip.c which don't compile. ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] [BUGS] PostgreSQL client has problems when libbind is installed
Don't break BeOS support. A new version of BeOS will be released very soon. http://www.yellowtab.com http://www.yellowtab.com/board/ http://www.yellowtab.com/support/ Regards, Yves - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Palle Girgensohn [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Tom Alsberg [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:00 PM Subject: Re: [BUGS] PostgreSQL client has problems when libbind is installed Palle Girgensohn [EMAIL PROTECTED] writes: [ linking libbind causes some obscure problems ] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/47218 Given that we're not supporting BeOS at the moment anyway, I wonder whether we need libbind on any platform. I know linking it causes some minor problems for me on HPUX (I have to take it out if I want to build with profiling...) Comments anyone? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] Errors compiling hba.c in current CVS
I am working on this now. The missing typedef for sa_family_t is really just used for structure alignment, so I am working on a fix to define a char array and #define to be the same length as the native ss_family, because on my system sa_family_t is: sys/sockettypes.h:11:typedef u_char sa_family_t; which seems to contradict the unsigned short as found by Jason on Cygwin, so it seems I will have to pull out the real family length, and use that in the structure. --- Bruno Wolff III wrote: On Mon, Jun 16, 2003 at 11:47:58 -0500, Bruno Wolff III [EMAIL PROTECTED] wrote: I get the errors below when compiling on a RH 6.1 system. I used the following config paramters: ./configure --prefix=/usr/local/pgsql --enable-integer-datetimes --with-pgport=5433 hba.c: In function `parse_hba': hba.c:590: structure has no member named `ss_family' hba.c:659: structure has no member named `ss_family' hba.c:691: structure has no member named `ss_family' hba.c: In function `ident_inet': hba.c:1210: structure has no member named `ss_family' hba.c: In function `authident': hba.c:1461: structure has no member named `ss_family' hba.c:1467: warning: unreachable code at beginning of switch statement make[3]: *** [hba.o] Error 1 I looked into this a bit more and found ss_family is defined in pqcomm.h which is included in auth.c which compiles and not in either hba.c or ip.c which don't compile. ---(end of broadcast)--- TIP 8: explain analyze is your friend -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] Domains and function arguments
Peter Eisentraut [EMAIL PROTECTED] writes: The SQL standard does not allow functions to have domains as arguments. Semantically, they have a point. I don't think they do. Declaring a domain as the input type seems a very natural way of asserting that the function only works over a subset of the base input type. For example, log() might usefully be declared to take arguments from a positivereal domain. Admittedly, we have trouble resolving the type to use when a function is overloaded with both a domain and a base type, but that's hardly surprising. The present algorithm for ambiguous-function resolution is probably excessively unfriendly to functions with domain inputs: it will match them *only* when they are an exact match (ie, the input argument is already declared or coerced to the domain type). I think that's bowing quite far enough in the direction of the standard; I'd like to loosen it someday, but don't have time to think about it more right now. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] PostgreSQL and Windows
Bruce, thank you for the information. May I ask you one more question? Will it be feasible to run the native Windows version of Postgres in-process (that is in client's process)? Thanks. -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 9:37 AM To: Yurgis Baykshtis Cc: PostGreSQL mailing list Subject: Re: [HACKERS] PostgreSQL and Windows Yurgis Baykshtis wrote: We have a similar question about upcoming Windows native release: Is it going to be multithreaded or one process per connection like on cygwin? One connection per process. The only multithreaded Win32 is SRA's commercial product. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] PostgreSQL and Windows
No, it will not run in the client process, and probably never will. --- Yurgis Baykshtis wrote: Bruce, thank you for the information. May I ask you one more question? Will it be feasible to run the native Windows version of Postgres in-process (that is in client's process)? Thanks. -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 9:37 AM To: Yurgis Baykshtis Cc: PostGreSQL mailing list Subject: Re: [HACKERS] PostgreSQL and Windows Yurgis Baykshtis wrote: We have a similar question about upcoming Windows native release: Is it going to be multithreaded or one process per connection like on cygwin? One connection per process. The only multithreaded Win32 is SRA's commercial product. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Errors compiling hba.c in current CVS
On Mon, Jun 16, 2003 at 03:36:55PM -0400, Bruce Momjian wrote: I am working on this now. The missing typedef for sa_family_t is really just used for structure alignment, so I am working on a fix to define a char array and #define to be the same length as the native ss_family, because on my system sa_family_t is: sys/sockettypes.h:11:typedef u_char sa_family_t; which seems to contradict the unsigned short as found by Jason on Cygwin, so it seems I will have to pull out the real family length, and use that in the structure. You have systems using BSD 4.3 where sa_family is an unsigned short, and BSD 4.4, where they split it up in sa_len (a u_char) and a sa_family (also a u_char). I was wondering about just using the SALEN to define what we want. Kurt ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Errors compiling hba.c in current CVS
On Mon, Jun 16, 2003 at 02:23:31PM -0500, Bruno Wolff III wrote: On Mon, Jun 16, 2003 at 11:47:58 -0500, Bruno Wolff III [EMAIL PROTECTED] wrote: I get the errors below when compiling on a RH 6.1 system. I used the following config paramters: ./configure --prefix=/usr/local/pgsql --enable-integer-datetimes --with-pgport=5433 hba.c: In function `parse_hba': hba.c:590: structure has no member named `ss_family' hba.c:659: structure has no member named `ss_family' hba.c:691: structure has no member named `ss_family' hba.c: In function `ident_inet': hba.c:1210: structure has no member named `ss_family' hba.c: In function `authident': hba.c:1461: structure has no member named `ss_family' hba.c:1467: warning: unreachable code at beginning of switch statement make[3]: *** [hba.o] Error 1 I looked into this a bit more and found ss_family is defined in pqcomm.h which is included in auth.c which compiles and not in either hba.c or ip.c which don't compile. It doesn't say it doesn't know the structure, but it says it doesn't know the member, which is very confusing to me. It's not making any sense at all. The SockAddr is defined in the same file, and it doesn't seem to give an error on that. SockAddr also uses the struct sockaddr_storage. hba.c includes libpq/libpq.h, which in his turn includes libpq/ip.h, which finaly includes libpq/pqcomm.h, so that shouldn't be a problem. Kurt ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] Errors compiling hba.c in current CVS
Does the following patch fix the problem? It doesn't use sa_family_t anymore. --- Kurt Roeckx wrote: On Mon, Jun 16, 2003 at 02:23:31PM -0500, Bruno Wolff III wrote: On Mon, Jun 16, 2003 at 11:47:58 -0500, Bruno Wolff III [EMAIL PROTECTED] wrote: I get the errors below when compiling on a RH 6.1 system. I used the following config paramters: ./configure --prefix=/usr/local/pgsql --enable-integer-datetimes --with-pgport=5433 hba.c: In function `parse_hba': hba.c:590: structure has no member named `ss_family' hba.c:659: structure has no member named `ss_family' hba.c:691: structure has no member named `ss_family' hba.c: In function `ident_inet': hba.c:1210: structure has no member named `ss_family' hba.c: In function `authident': hba.c:1461: structure has no member named `ss_family' hba.c:1467: warning: unreachable code at beginning of switch statement make[3]: *** [hba.o] Error 1 I looked into this a bit more and found ss_family is defined in pqcomm.h which is included in auth.c which compiles and not in either hba.c or ip.c which don't compile. It doesn't say it doesn't know the structure, but it says it doesn't know the member, which is very confusing to me. It's not making any sense at all. The SockAddr is defined in the same file, and it doesn't seem to give an error on that. SockAddr also uses the struct sockaddr_storage. hba.c includes libpq/libpq.h, which in his turn includes libpq/ip.h, which finaly includes libpq/pqcomm.h, so that shouldn't be a problem. Kurt ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/include/libpq/pqcomm.h === RCS file: /cvsroot/pgsql-server/src/include/libpq/pqcomm.h,v retrieving revision 1.86 diff -c -c -r1.86 pqcomm.h *** src/include/libpq/pqcomm.h 12 Jun 2003 07:36:51 - 1.86 --- src/include/libpq/pqcomm.h 16 Jun 2003 21:11:09 - *** *** 43,57 /* * Definitions used for sockaddr_storage structure paddings design. */ ! #define _SS_PAD1SIZE(_SS_ALIGNSIZE - sizeof (sa_family_t)) ! #define _SS_PAD2SIZE(_SS_MAXSIZE - (sizeof (sa_family_t) + \ _SS_PAD1SIZE + _SS_ALIGNSIZE)) struct sockaddr_storage { #ifdef SALEN uint8_t __ss_len;/* address length */ #endif ! sa_family_t ss_family; /* address family */ char __ss_pad1[_SS_PAD1SIZE]; /* 6 byte pad, this is to make implementation --- 43,60 /* * Definitions used for sockaddr_storage structure paddings design. */ ! /* Some platforms don't have sa_family_t, so we compute it ourselves */ ! #define SIZEOF_SOCKADDR_FAMILYsizeof(((struct sockaddr *)0)-sa_family) ! ! #define _SS_PAD1SIZE(_SS_ALIGNSIZE - SIZEOF_SOCKADDR_FAMILY) ! #define _SS_PAD2SIZE(_SS_MAXSIZE - (SIZEOF_SOCKADDR_FAMILY + \ _SS_PAD1SIZE + _SS_ALIGNSIZE)) struct sockaddr_storage { #ifdef SALEN uint8_t __ss_len;/* address length */ #endif ! char dummy_sa_family[SIZEOF_SOCKADDR_FAMILY]; char __ss_pad1[_SS_PAD1SIZE]; /* 6 byte pad, this is to make implementation ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[HACKERS] Our FLOAT(p) precision does not conform to spec
Fernando Nasser of Red Hat pointed out to me that we are not quite spec-compliant on the FLOAT(p) datatype notation. We interpret P as the number of decimal digits of precision, and hence translate P = 1..6 = float4 (a/k/a REAL) P = 7..15 = float8 (a/k/a DOUBLE PRECISION) otherwise error However, the spec is perfectly clear that P is to be interpreted as the number of *binary* digits of precision, not decimal digits. SQL92 section 4.4.1 says: An approximate numeric value consists of a mantissa and an expo- nent. The mantissa is a signed numeric value, and the exponent is a signed integer that specifies the magnitude of the mantissa. An approximate numeric value has a precision. The precision is a posi- tive integer that specifies the number of significant binary digits ^^ in the mantissa. The value of an approximate numeric value is the mantissa multiplied by 10^exponent. So it's fairly clear that P is not the number of decimal digits. (The reference to multiplying by 10^exponent seems bogus, since on machines where the mantissa is in fact binary, one would expect a base-2 or possibly base-16 exponent to be used. But this does not affect the precision of the mantissa AFAICS.) On the assumption that most platforms have IEEE float math, it would be appropriate to interpret P like this: P = 1..24 = float4 P = 25..53 = float8 otherwise error This is a straightforward change and would not break pg_dump files, since fortunately pg_dump always references the underlying types and never refers to anything as FLOAT(p). But I wonder whether it is likely to break many existing applications. There is a hazard of some existing app asking for (what it thinks is) float8 and getting float4 instead. Is it worth trying to provide some sort of backwards-compatibility mode? We could imagine adding a GUC variable to select binary or decimal precision, but I really don't want to. It would increase the amount of work needed by more than an order of magnitude, and this problem doesn't seem worth it. I'd rather just list this under Incompatibilities in the 7.4 release notes. Comments? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[HACKERS] Reordered .conf file ... need help with LC_vars
Folks, I've re-ordered postgresql.conf.sample per our discussions here. However, the changes in postgresql.conf.sample need to be reflected in the initdb script's generation of the LC_* variables. Can someone help me with the requisite modification to initdb? Thanks. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] confused with encodings
Tatsuo, recently I tried to understand why I can't get sorting works properly with cyrillic characters in UTF8 datbase. I figure out the reason of my confusion - I thought I could specify different encodings for different databases and these encodings will be used in text operations (sort, upper,lower), not just for conversion. But, actually, the only encoding is important for text operations - the one specified with 'initdb' command ! Is't true ? If so, it's a big issue :) After I created separate storage for unicode (initdb -E utf8) and restarted postmaster I got success with 'order by', but upper(), lower() functions still fails. [I assume you enable the locale support.] Dont't ask me. These are locale support problems. -- Tatsuo Ishii ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[HACKERS] pg_get_triggerdef in pg_dump
Is there any point using pg_get_triggerdef in pg_dump to generate trigger definitions? We'd still have to keep the old code so that we can dump pre 7.4, but it might mean we don't have to touch that code again if we add triggers on columns or something... Also, it doesn't format them as nicely as the current pg_dump code... Chris ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] Our FLOAT(p) precision does not conform to spec
Tom Lane wrote: Is it worth trying to provide some sort of backwards-compatibility mode? We could imagine adding a GUC variable to select binary or decimal precision, but I really don't want to. It would increase the amount of work needed by more than an order of magnitude, and this problem doesn't seem worth it. I'd rather just list this under Incompatibilities in the 7.4 release notes. Let's just change it and list it in the release notes as an incompatibility --- anything else is too confusing. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] pg_get_triggerdef in pg_dump
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Is there any point using pg_get_triggerdef in pg_dump to generate trigger definitions? We'd still have to keep the old code so that we can dump pre 7.4, but it might mean we don't have to touch that code again if we add triggers on columns or something... Seems like a good idea to me --- we've been trying to reduce pg_dump's knowledge of backend nitty-gritty, and this would be another small step in the right direction. Also, it doesn't format them as nicely as the current pg_dump code... That's fixable no? I guess you might want to consider what psql's \d display will look like too, but I don't recall that we ever promised anyone that the pg_get_xxx functions would output no unnecessary whitespace. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] pg_get_triggerdef in pg_dump
Seems like a good idea to me --- we've been trying to reduce pg_dump's knowledge of backend nitty-gritty, and this would be another small step in the right direction. Also, it doesn't format them as nicely as the current pg_dump code... That's fixable no? I guess you might want to consider what psql's \d display will look like too, but I don't recall that we ever promised anyone that the pg_get_xxx functions would output no unnecessary whitespace. We make pg_get_xxx2 functions that return a formatted version. Internally, we just add an extra boolean parameter to the pg_get_triggerdef() function in ruleutils and we call that true or false depending... Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] confused with encodings
On Mon, 16 Jun 2003, Oleg Bartunov wrote: I thought I could specify different encodings for different databases and these encodings will be used in text operations (sort, upper,lower), not just for conversion. En encoding does not imply any sort order. UTF-8 can be used to store strings in many languages, each having different sort order (and other properties). It's the locale that determines these things. It would be nice to be able to set the locale per database, or even per column. -- /Dennis ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org