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
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
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
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
-
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
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
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
"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
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
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:
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)--
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)-
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
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
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
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
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
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
---
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
--
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
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)-
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)
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)
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 -
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
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
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
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
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,
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
30 matches
Mail list logo