[GENERAL] about "allow reporting of which objects are in which tablespace"?

2005-04-04 Thread Ying Lu
Hello, I just want to know is the following item in the TODO list available now? If it is ready, may I know the commands or functions to retrieve objects in a specific tablespace please? * Allow reporting of which objects are in which tablespaces Thanks a lot, Emi --

[GENERAL] About ERROR: could not convert UTF-8 character 0x00e9 to ISO8859-1

2005-04-13 Thread Ying Lu
Greetings, PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2. When I run select * from table1; I got an error: = ERROR: could not convert UTF-8 character 0x00e9 to ISO8859-1 I tried to google but cannot find much info about it. Can somebody help? Thanks, Emi ---

Re: [GENERAL] About ERROR: could not convert UTF-8 character 0x00e9

2005-04-13 Thread Ying Lu
a programs ) Thanks a lot, Emi SET CLIENT_ENCODING TO 'LATIN1' ; SELECT * FROM table1 ; Your database woul be coded as LATIN1. Luc - Original Message - From: "Ying Lu" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 13, 2005 5:49 PM Subject: [GENERAL] About ERRO

Re: [GENERAL] About ERROR: could not convert UTF-8 character 0x00e9

2005-04-13 Thread Ying Lu
database woul be coded as LATIN1. Luc - Original Message - From: "Ying Lu" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 13, 2005 5:49 PM Subject: [GENERAL] About ERROR: could not convert UTF-8 character 0x00e9 to ISO8859-1 Greetings, PostgreSQL 8.0.1 on i686-pc-linux-gn

[GENERAL] use SAVEPOINT function

2005-04-14 Thread Ying Lu
Greetings, I'd like to know is it possible to use "SAVEPOINT" in a function? In the following example, I got an error when calling this function: CREATE OR REPLACE function test() returns trigger as $test$ BEGIN SAVEPOINT savepoint1; ... ... COMMIT; RETURN NEW; EXCEPTION when RAI

Re: [GENERAL] use SAVEPOINT function

2005-04-14 Thread Ying Lu
The error msg is: SPI_execute_plan failed executing query "SAVEPOINT savepoint1": SPI_ERROR_TRANSACTION I'd like to know is it possible to use "SAVEPOINT" in a function? In the following example, I got an error when calling this function: CREATE OR REPLACE function test() returns trigger as $te

[GENERAL] About index - "a query or data manipulation command can use at most one index per table"

2005-04-26 Thread Ying Lu
Hello List, A question about index. It mentioned in postgresql 8.0 doc "a query or data manipulation command can use *at most one index* *per table*". An example query is: select * from A left join B using (id) where A.type='apple' and A.isExport=true; "id" is the primary key for both table A

[GENERAL] "current transaction is aborted, commands ignored until end of transaction block" Error

2005-05-05 Thread Ying Lu
Greetings, Through java - JDBC, trying to do "select * from Table" using "lock table IN SHARE MODE"; Always got this error: "current transaction is aborted, commands ignored until end of transaction block" Some clues about it? Thanks a lot! Emi ---(end of broadcast)-

[GENERAL] Question about running "Vacuum" through JDBC

2005-05-06 Thread Ying Lu
Greetings, I tried to "Vacuum table" through JDBC. I got the following errors: ERROR: VACUUM cannot run inside a transaction block Does it mean I should only run vacuum through the command line such as "psql> vacuum TableName "? Thanks a lot, Emi ---(end of broadcast)--

[GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL 8.0)

2005-05-09 Thread Ying Lu
Greetings, We are working on speeding up the queries by creating indexes. We have queries with searching criteria such as "select ... where *col1='...'*". This is a simple query with only "=" operation. As a result I setup hash index on column "col1". While, in postgreSQL 8 doc, it is wirttern:

[GENERAL] which commands under PostgreSQL do the similar func provided by "show processlist" under mysql

2005-06-06 Thread Ying Lu
Greetings, I have a question about how to see current processes running under postgreSQL. "show processlist" will display DB, command, time, State, etc under MySQL: | Id | User | Host| db | Command | Time | *State * | *Info* | 21 | admin | serv

Re: [GENERAL] which commands under PostgreSQL do the similar func

2005-06-06 Thread Ying Lu
"show processlist" will display DB, command, time, State, etc under MySQL: | Id | User | Host| db | Command | Time | *State * | *Info* | 21 | admin | server1:40898 | test | *Query* | 104 | Copying to tmp table | INSERT INTO test (SEL

[GENERAL] About unsigned smallint?

2005-07-06 Thread Ying Lu
Greetings, Can I know whether postgreSQL 8.0 supports unsigned smallint please? I looked at the doc, it seems that OID is unsigned interger. While I was trying to create a simple table as: create table test (id unsigned smallint); or create table test (id

[GENERAL] find objects under a specific tablespace

2005-07-07 Thread Ying Lu
Greetings, I'd like to know how to check whether a specific object is created under a specific *tablespace*? How to find all objects under a specific tablespace? For example, one index named "idx_test1" has been created. Now I'd like to check which tablespace does this index belong to? Tha

[GENERAL] About retrieving objects' priviledge info such as grantee & its privileges for a specific object (view, table, function, etc.)

2005-07-18 Thread Ying Lu
Hello, May I know the commands to retrieve objects' privileges info please? Something like: Object Type, Object name,creator,grantee,privilege, is_creatable === table T1user1 user2 select

[GENERAL] About Tools at the DB design phase.

2005-07-27 Thread Ying Lu
Greetings, I am at the design phase of the DB design. That is, I'd like to design tables and relationships between them, but not the real implement of tables. Could somebody suggest some good and free tools to help/ease design the structures please? Thanks a lot! Emi -

[GENERAL] Questions about anonymous procedure/function.

2005-08-02 Thread Ying Lu
Greetings, I have a question about whether I am able to create an *anonymous* procedure/function under postgreSQL 8. Something like: Begin ... ... update ... IF ... THEN rollback END IF; ... ... END; I'd like to do a series of operations. If any one of the opers failed, all previ

[GENERAL] About using plpgsql funciton variable as the table name

2005-08-11 Thread Ying Lu
Greetings, I met a question about how to use *function variable *as the *table name* to select count(*) into an integer variable for the table. CREATE OR REPLACE FUNCTION update_code_map(VARCHAR, VARCHAR) RETURNS VARCHAR AS $$ DECLARE *tableName ALIAS FOR $1*; *rec_num

Re: [GENERAL] About using plpgsql funciton variable as the table

2005-08-11 Thread Ying Lu
Thank you all for the helping. I made a bit changes as the following and it works. CREATE OR REPLACE FUNCTION update_code_map(VARCHAR, VARCHAR) RETURNS VARCHAR AS $$ DECLARE tableName ALIAS FOR $1; st1_tabno_value ALIAS FOR $2; rec_num INTEGER; query_value

[GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread Ying Lu
Hello, I have a table named "USER" under MySQL database. When I am trying to move tables from MySQL to PostgreSQL, I found that I could not create a table namely "USER". I guess "USER" is a key string used by PostgreSQL system so that we could not create a table named "USER". Is that true? Than

[GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread Ying Lu
Hello, I have a question about "date" & "timestamp" types in PostgreSQL. I want to setup the default value '-00-00' and "-00-00 00:00:00" for them. However, it seems that PostgreSQL does not support it. Could someone helps me please? The example table: T1 (col1 varchar(7) not null,

Re: [GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread Ying Lu
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Mascari Sent: Wednesday, August 18, 2004 11:24 AM To: Ying Lu Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Could not create a table named "USER" under postgreSQL Ying Lu wrote: Hello, I have a table n

[GENERAL] About "lock file postmaster.pid" Error , cannot setup postmaster

2004-08-31 Thread Ying Lu
Hello all, I met a problem about cannot start postmaster. The situation I met is that I was running postmaster, but because of the server closed all my konsole. As a result, I did not shutdown postmaster successfully. Next time, when I tried to run postmaster -D /usr/local/postgresql/data, I got

Re: [GENERAL] About "lock file postmaster.pid" Error , cannot setup

2004-08-31 Thread Ying Lu
Thank you gnari, I deleted the postmaster.pid and /tmp/.s.PGSQL.5432.lock files; now it works :) gnari wrote: From: "Ying Lu" <[EMAIL PROTECTED]> The situation I met is that I was running postmaster, but because of the server closed all my konsole. As a result, I did not shu

[GENERAL] Changed a column type from "integer" to varchar

2004-09-14 Thread Ying Lu
Hi, I have a question about alter a column's type in a postgreSQL table. For example, I have 10, 000 records in a table name "test", I'd like to change column "machineID" type from integer to varchar. I am looking for something like: alter table test alter column machineID ... ... varchar Thanks

Re: [GENERAL] Changed a column type from "integer" to varchar

2004-09-14 Thread Ying Lu
Currently, what I did is like . alter table test add column machineIDnew varchar; . update test set machineIDnew = machineID; . alter table test rename machineIDnew to machineID; . vacuum full table; If better ways, please let me know. Thanks a lot, Greg Donald wrote: On Tue, 14 Sep 2004 13:33:32 -

[GENERAL] about "pg_dump " without pompt password

2004-09-30 Thread Ying Lu
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly ---(end of broadcast)

[GENERAL] about "pg_dump " without pompt password

2004-09-30 Thread Ying Lu
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly ---(end of broadcast)

[GENERAL] about "pg_dump " without pompt password

2004-10-01 Thread Ying Lu
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly ---(end of broadcast)-

[GENERAL] Commands to browse current connections and processes

2004-10-06 Thread Ying Lu
Hello, In mysql, we use "show processlist" to see all current process. Could someone let me know in PostgreSQL, what commands that we can check the current connections and processes please? Thanks a lot, Ly ---(end of broadcast)--- TIP 1: subscrib