Re: [HACKERS] Server-side support of all encodings

2007-06-24 Thread William ZHANG
er/scanner can process multi-bytes characters correctly. Thanks in advance. William ZHANG > > regards, tom lane > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to &g

Re: [HACKERS] EOL characters and multibyte encodings

2007-06-22 Thread William ZHANG
ing, and those don't have any ASCII >> aliasing problems (all bytes of an MB character must have high bit set). The lower byte of some characters in BIG5, GBK, GB18030 may be less than 0x7F and don't have the high bit set. Fortunately, they don't use 0x0D and 0x0A (CR and LF).

Re: [HACKERS] ERROR: operator does not exist: integer !=- integer

2007-03-06 Thread William ZHANG
I get it. scan.l converts '!=' to '<>': 644 /* Convert "!=" operator to "<>" for compatibility */ 645 if (strcmp(yytext, "!=") == 0) 646 yylval.str = pstrdup("<>"); 647 else 648

[HACKERS] ERROR: operator does not exist: integer !=- integer

2007-03-04 Thread William ZHANG
1: ?column? = "f" (typeid = 16, len = 1, typmod = -1, byval = t) -- Regards, William ZHANG ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [HACKERS] ecpg tests make failed on Win32/MinGW

2006-08-15 Thread William ZHANG
"Michael Meskes" <[EMAIL PROTECTED]> > On Sat, Aug 12, 2006 at 12:11:21AM +0800, William ZHANG wrote: >> I have found the cause. >> ... > > Thanks a lot for your effort. You are welcome. > In a few minutes I will commit a change that fixed this in my

Re: [HACKERS] ecpg tests make failed on Win32/MinGW

2006-08-11 Thread William ZHANG
1, NULL, "create function My_Table_Check () returns trigger as $test$\ BEGIN\ RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN;\ RETURN NEW;\ END; $test$ language plpgsql", ECPGt_EOIT, ECPGt_EORT); #line 24 "func.pgc" if (sqlca.sqlwarn[0] =

Re: [HACKERS] Bison Version

2006-08-11 Thread William ZHANG
Due to the bug in bison 2.1, I always use version 1.875: http://www.mail-archive.com/bug-bison@gnu.org/msg00718.html ""Christopher Kings-Lynne"" <[EMAIL PROTECTED]> > What version of Bison is currently required to compile HEAD? 1.75 > doesn't seem to work... > > ---(en

Re: [HACKERS] Win32 max connections bug (causing crashes)

2006-08-10 Thread William ZHANG
Maybe this article can help: Windows and the ClearCase process limit: Understanding the desktop heap http://www-128.ibm.com/developerworks/rational/library/05/1220_marechal/ ""Merlin Moncure"" [EMAIL PROTECTED] >I confirmed the problem on a fairly recent 8.2devel > > merlin > > On 8/10/06, Merlin

[HACKERS] ecpg tests make failed on Win32/MinGW

2006-08-10 Thread William ZHANG
e are "^M"s followed by "\". It seems that the "^M"s are generated by the lexer/grammer. Any one knows the actual cause? -- With regards, William ZHANG ---(end of broadcast)--- TIP 1: 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] Shared library conflicts

2006-06-23 Thread William ZHANG
-zlib will affected LIBS and HAVE_LIBZ defined in configure. I searched HAVE_LIBZ in the source code, and find only pg_dump use it. I think we can change LIBS to not include "-lz" in configure, and add "-lz" for pg_dump in its Makefile. With regards, Wi

Re: [HACKERS] PL/pgSQL 'i = i + 1' Syntax

2006-05-17 Thread William ZHANG
o do an assignment with '='. > But I guess that the current behaviour of PL/pgSQL should not reflect > that to maintain backward compatibility, right? > I think Oracle's syntax and behaviour are better. As for this feature, breaking the backward compatibility is a

Re: [HACKERS] [pgsql-hackers-win32] Build with Visual Studio & MSVC

2006-05-05 Thread William ZHANG
work with pgsql-8.1. Sorry for the late response. Regards, William ZHANG ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message

Re: [HACKERS] Strange results from to_timestamp

2006-04-06 Thread William ZHANG
ISTM, and mismatch between the date/time string and the format string will lead to strange results. The source code of to_timestamp() is in src/backend/utils/adt/formatting.c: Datum to_timestamp(PG_FUNCTION_ARGS) Regards, William ZHANG "Mario Weilguni" <[EMAIL PROTECTED]> &g

Re: [HACKERS] Modular Type Libraries: was A real currency type

2006-03-22 Thread William ZHANG
t bit string is useless and easy to cause confusion? Regards, William ZHANG ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [HACKERS] Bug report form: locale/encoding

2006-03-16 Thread William ZHANG
- Original Message - From: "Andrew Dunstan" <[EMAIL PROTECTED]> To: "William ZHANG" <[EMAIL PROTECTED]> Cc: Sent: Thursday, March 16, 2006 11:04 PM Subject: Re: [HACKERS] Bug report form: locale/encoding > William ZHANG wrote: > >>>Has

Re: [HACKERS] Bug report form: locale/encoding

2006-03-16 Thread William ZHANG
em for pgsql? Regards, William ZHANG ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [HACKERS] Proposal for updatable views

2006-03-13 Thread William ZHANG
> A quick look at the grammar suggests that the key problem is the > opt_timezone production --- it might be that if we removed that in > favor of spelling out the alternatives at the call sites, the conflict > would go away. bison-fu is all about postponing shift/reduce decisions > until you've s

Re: [HACKERS] Proposal for updatable views

2006-03-12 Thread William ZHANG
D (this syntax creates a shift/reduce > conflict in the grammar file i don't know how to fix). Maybe you can fix it like UNIONJOIN. See parser.c. But Tom said he want to remove the support for UNION JOIN and save the overhead: http://archives.postgresql.org/pgsql-hackers

Re: [HACKERS] Proposal for SYNONYMS

2006-03-09 Thread William ZHANG
SYNONYMS are symbolinks in database? CREATE SYNONYMS bar FOR foo; DROP TABLE foo; Now bar point to an invalid object. Or should we let DROP TABLE foo CASCADE; to drop the SYNONYMS depended on the table? Also need to add \d support for psql. Regards, William ZHANG

Re: [HACKERS] Compiling UDF DLL under Win32

2006-02-07 Thread William ZHANG
""Magnus Hagander"" <[EMAIL PROTECTED]> > No, you need to use mingw to compile extensions. I think we should write some documents on how to generate postgres.lib from postgres.exe for VC++, Borland C++ users. > //Magnus > > ---(end of broadcast)---

Re: [HACKERS] GRANT/REVOKE: Allow column-level privileges

2006-01-30 Thread William ZHANG
hard enought to figure out a better algorithm. Another problem is, should we allow any circles to be formed when executing GRANTs? Say: , , , should the third GRANT be executed successfuly? I remember that MSSQL 2000 and ORACLE 9i are different. William ZHANG ---

Re: [HACKERS] GRANT/REVOKE: Allow column-level privileges

2006-01-26 Thread William ZHANG
I think we should pay attention to the sematic of table privs and column privs. Here is some examples. 1. role1 GRANT table priviledge SELECT on table S to role2. role1 REVOKE column priviledge SELECT on column S(SNO) from role2. 2. deal with circles in GRANT graph. "kevin brintnall" <[EMAIL

Re: [HACKERS] debug_query_string and multiple statements

2006-01-26 Thread William ZHANG
If we want to save the SQL statement for some database objects(table, view, etc.), the backend will see the same problem. Here is an example. create table s(sno int, sname char(10)); select 1; I recall that some DBMS will store the statement for table s like this: create table s(sno int,

Re: [HACKERS] Possible problem with pg_reload_conf() and view pg_settings

2005-11-07 Thread William ZHANG
I have tested on pgsql-8.1-beta3 on Windows 2003. It works fine. I changed the line in postmaster.conf between "on" and "off". (Remember to save it each time). And paste the two lines in psql to see the results. select pg_reload_conf(); select setting from pg_settings where name = 'const

Re: [HACKERS] libpq's pollution of application namespace

2005-10-20 Thread William ZHANG
t there's no consensus on whether we > should do it if it can't be done for everyone in a simple way. Now I understand the problem. We can not find a portable way to do it. But we can support GCC now, then add support for other compilers. As time goes on, we can finall

Re: [HACKERS] libpq's pollution of application namespace

2005-10-20 Thread William ZHANG
I think it is a good idea to make the exported symbols clearer. We should only export the symbols needed. The output of "dlltool --export-all" is too big. AFAIK, we can generate *.def for Win32/MSVC++ from a text file like this. PQclear PQfn FooGlobalData DATA "Neil Conway" <[EMAIL PR

Re: [HACKERS] Database file compatability

2005-09-28 Thread William ZHANG
"Qingqing Zhou" <[EMAIL PROTECTED]> wrote > > "Tom Lane" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > There are no platforms for which ALIGNOF_SHORT is different from 2. > > I don't think there are any platforms we care about where ALIGNOF_INT > > is different from 4. The

Re: [HACKERS] beta2 make check failed on Win32

2005-09-21 Thread William ZHANG
What you find is in initdb.c. Maybe the author want to make single quotes escaped just the same as in SQL. But guc-file.l is unaware of it. "Qingqing Zhou" <[EMAIL PROTECTED]> wrote > > Diff current version vs. some earlier version, you see this: > > /* > * signal handler in case we are interr

[HACKERS] beta2 make check failed on Win32

2005-09-20 Thread William ZHANG
# locale for time formatting It seems that we cannot deal with embedded quotes correctly. For simplicity, we can test using any parameter with string type. e.g. bonjour_name. -- Regards, William ZHANG ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] Time to close hackers-win32?

2005-09-17 Thread William ZHANG
""Dave Page"" writes > It occurs to me that there is no longer any great need to have a > separate hackers list for win32 development. Perhaps we should close it > down now and keep all development on -hackers? I agree with it. > Regards, Dave. > > ---(end of broadcast)-

Re: [HACKERS] Call for 7.5 feature completion

2005-09-05 Thread William ZHANG
"Bruce Momjian" wrote >> William ZHANG wrote: > > - Original Message - > > > From: "Dave Page" > > > To: "Andrew Dunstan" <[EMAIL PROTECTED]>; "William ZHANG" <[EMAIL PROTECTED]> > > > Cc:

Re: [HACKERS] Call for 7.5 feature completion

2005-09-05 Thread William ZHANG
mpiled > and > > | built inside of visual studio 6. I think Jan Wieck was one of the > > | people involved in the effort. > > > > | That would be a good place to start looking. > > > > | Merlin > > > > I know sth. about Jan Wieck's work, but cann

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread William ZHANG
- Original Message - From: "Andrew Dunstan" <[EMAIL PROTECTED]> To: "Dave Page" Cc: "William ZHANG" <[EMAIL PROTECTED]>; Sent: Wednesday, August 31, 2005 10:24 PM Subject: Re: [HACKERS] Call for 7.5 feature completion > Dave Page wrote: &

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread William ZHANG
- Original Message - > From: "Dave Page" > To: "Andrew Dunstan" <[EMAIL PROTECTED]>; "William ZHANG" <[EMAIL PROTECTED]> > Cc: > Sent: Thursday, September 01, 2005 3:21 PM > Subject: RE: [HACKERS] Call for 7.5 feature completion

Re: [HACKERS] Call for 7.5 feature completion

2005-08-31 Thread William ZHANG
* Updatable Views per SQL * INTERVAL data type per SQL * BLOB/CLOB data type per SQL * Faster bulk load * Remove "current transaction is aborted, commands ignored ..." * Compile with MSVC on Win32 platforms. MySQL support it. * Thread safety libpq, ecpg. -- Regards, Wil

Re: [HACKERS] CREATE USER and pg_user

2005-08-24 Thread William ZHANG
- Original Message - From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: "William ZHANG" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, August 24, 2005 3:27 AM Subject: Re: [HACKERS] CREATE USER and pg_user > You should take a look at > http://lnk.nu/develo

Re: [HACKERS] CREATE USER and pg_user

2005-08-23 Thread William ZHANG
more about SQL:2003, pgsql-8.1 doc and RBAC (Role Based Access Control, http://csrc.nist.gov/rbac/rbac-stds-roadmap.html) to understand it correctly. Regards, William ZHANG ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] CREATE USER and pg_user

2005-08-13 Thread William ZHANG
"Tom Lane" <[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED] > "William ZHANG" <[EMAIL PROTECTED]> writes: > > Why not change the option "createuser" to "superuser", > > Backwards compatibility with existing dump files. &g

[HACKERS] CREATE USER and pg_user

2005-08-12 Thread William ZHANG
omething to make is easier to understand? -- Best regards, William ZHANG ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] SELECT for UPDATE and outer join?

2005-08-12 Thread William ZHANG
I find the comments in initsplan.c as following. /* * Presently the executor cannot support FOR UPDATE/SHARE marking of * rels appearing on the nullable side of an outer join. (It's * somewhat unclear what that would mean, anyway: what should we * mark when a result row is generated

Re: [HACKERS] Utility database (Was: RE: Autovacuum in the backend)

2005-06-17 Thread William ZHANG
I also think it is useful and make things easier. A connection on template1 also prevent others to create new databases. connection1: template1#= connection2: foo=# create database bar; ERROR: source database template1 is being accessed by other users ---(end of broad

Re: [HACKERS] OLE DB driver

2004-01-11 Thread William ZHANG
"Shachar Shemesh" <[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED] > Andreas Pflug wrote: > > > I wonder if this could be implemented as a wrapper around libpq. This > > way, the OLEDB driver would benefit from a proven piece of software. > > > > Regards, > > Andreas > > That's what I'm doing. I'm not s

Re: [HACKERS] psql \d option list overloaded

2004-01-08 Thread William ZHANG
I think moving the \d and simliar features in psql to SQL is a good idea. That will make the features available in any client library. As for the syntax, maybe a investigation is needed. ---(end of broadcast)--- TIP 6: Have you searched our list ar

[HACKERS] ecpg's minor bug

2004-01-03 Thread William ZHANG
in preproc.y:2021: opt_revoke_grant_option: GRANT OPTION FOR $$ = make_str("with grant option"); should be: $$ = make_str("grant option for"); I get the lastest CVS version. ---(end of broadcast)--- TIP 9: the planner will ignore y

[HACKERS] What's the difference between int2 and int16?

2003-11-19 Thread William ZHANG
I found the uses of int2, int16 and other similiar types misleading in PostgreSQL's source code. Sometime it is difficult to figure out which should be prefered. Maybe int2, int4, and int8 refer to database types, while int16, int32 and int64 refer to C data types. If this is the convention, maint

Re: [HACKERS] bug in 7.4 ...

2003-11-11 Thread William ZHANG
PostgreSQL seems to maintance the unique index when updating each row. If the insert sequence is 1, 2, 3, 4, 5, when doing UPDATE testtabelle SET c001 = c001 - 1 It happens to process rows 1, 2, 3, 4, 5 in the same order as you insert. Thus we see the UPDATE finished successfully. But, if we