[SQL] Special characters in SQL queries

2003-03-09 Thread Vernon Wu
First a single quote in text, when a backforward slash in a file path, what other special characters need padded in two backslashes before using the data in a SQL statement? After hours' search in the PostgreSQL archive, I find a releted information on the http://www.ca.postgresql.org/users- l

Re: [SQL] null foreign key column

2003-02-12 Thread Vernon Wu
12/02/2003 2:24:49 PM, Dmitry Tkach <[EMAIL PROTECTED]> wrote: >You don't want it to be serial - just make it 'person_id in' Any reasons? > >I hope, it helps... > >Dima > >Arunachalam Jaisankar wrote: >> This is a multi-part message in MIME format. >> >> --=_NextPart_000_0005_01C2D1EE.6199

Re: [SQL] performance question

2003-01-20 Thread Vernon Wu
20/01/2003 12:38:20 PM, Tom Lane <[EMAIL PROTECTED]> wrote: >"Moritz Lennert" <[EMAIL PROTECTED]> writes: >> One question I asked myself is whether the use of char(2) is the best >> option. > >It may not be, particularly if you are running in a non-English locale. >Comparisons will invoke the stan

Re: [SQL] query speed joining tables

2003-01-16 Thread Vernon Wu
16/01/2003 9:46:30 AM, "Josh Berkus" <[EMAIL PROTECTED]> wrote: >Vernon, > >> What I stated is my observation on my project with over twenty >> multivalued detail tables. I have a selection query >> contained 200 characters, involving 10 tables, and using subquery. >> The performance is not bad a

Re: [SQL] query speed joining tables

2003-01-15 Thread Vernon Wu
Hi, Josh, I appreciate you share your experience here. I definitely don't have that many years' DBA experience behind, and are learning to get DB design right at the first place. What I stated is my observation on my project with over twenty multivalued detail tables. I have a selection quer

Re: [SQL] How does postgres handle non literal string values

2002-12-04 Thread Vernon Wu
l with any JDBC driver issues. > When we make the transition successfully, I hope to be able to >publicize the work and the value of PostgreSQL. > >Charlie > >Vernon Wu wrote: > >>In general, it isn't a good idea to have SQL statements in JSP files. A good >practis

Re: [SQL] How does postgres handle non literal string values

2002-12-03 Thread Vernon Wu
In general, it isn't a good idea to have SQL statements in JSP files. A good practise is using Mode 2. The Struts is a popular Mode 2 framework. If your application is very small and it won't grow into a big one, you can get around using Mode 1. In the situation, the SQL tags of JSTL will be a

Re: [SQL] Can I search for an array in csf?

2002-10-22 Thread Vernon Wu
Hi, Christoph, Thanks for reminding me regular expression. The background of my question is about attributes of one element, say hobby for example. Different people have different hobbies. Inside of the application, hobbies are denoted in various characters. The selection I mentioned in the

Re: Fwd: Re: [SQL] Can I search for an array in csf?

2002-10-22 Thread Vernon Wu
Hi, Achilleus and Josh, I know three ways to store dynamic array in DB: object, xml or csv, and sub-table. It seems to me there are some problems of using the first method in Java. I don't know how the third method work out. That is the reason I use the second method. In my project, the simp

Fwd: Re: [SQL] Can I search for an array in csf?

2002-10-21 Thread Vernon Wu
Hi, Richard, Thanks for your response and see below. 10/21/2002 3:13:57 AM, Richard Huxton <[EMAIL PROTECTED]> wrote: >On Friday 18 Oct 2002 1:58 pm, Vernon Wu wrote: >> One field of a table stores an array of characters in a string fromat as >> "a,b,c,d&quo

[SQL] Can I search for an array in csf?

2002-10-18 Thread Vernon Wu
One field of a table stores an array of characters in a string fromat as "a,b,c,d". Is anyway to apply a select statement without using stored procedure? Thanks for your input. Vernon ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmas

[SQL] i18n in pgSQL

2002-07-05 Thread Vernon Wu
Hi, I am working on an application intended for multilingual users. I have learnt from a source that I shall define double-byte data type such as nvarchar and ntext in DB. I don't see these data type in the pgsql online document. I have tried to create a table with the data type. The nvarcha

[SQL] A problem on running a sql script in DBVisualizer

2002-06-22 Thread Vernon Wu
Sorry for this question is somewhat off the topic of this mailing list. I use the DBVisualizer to run a sql script. I have somethink like: drop table a; create table a( . . . ); drop table b; create table b ( . . . ) inherits a; I get an error: Relation "b" inherits from "

Re: [SQL] Please help me out on this insert error

2002-06-13 Thread Vernon Wu
6/14/2002 6:31:16 AM, Stephan Szabo <[EMAIL PROTECTED]> wrote: > >On Thu, 13 Jun 2002, Vernon Wu wrote: > >> I, however, didn't use double quote mark when I created the table at all. > >If you used an interface to generate the table def, alot of them add the &g

Re: [SQL] Please help me out on this insert error

2002-06-13 Thread Vernon Wu
quote mark when I created the table at all. Now, I need to figure out how to add double quote mark in Java code query string. v. 6/14/2002 6:12:18 AM, Stephan Szabo <[EMAIL PROTECTED]> wrote: >On Thu, 13 Jun 2002, Vernon Wu wrote: > >> >> Command: >> >> In

[SQL] Please help me out on this insert error

2002-06-13 Thread Vernon Wu
Command: Insert into profile (userid, haveChildren)values('id98', 'No'); Error: ERROR: Relation 'profile' does not have attribute 'havaChildren' Table: Table "profile" Column| Type | Modifiers --+---+-- useri