| |
thread by: priyan |
last post Sep 21 '07 by: priyan
Hi all,
I had created a view from a table employee from my database. View is created sucuessfully and when i inserted data into employee table it is also updated in the view but i tried to insert data into my view but it shows an error.
create view empp as select * from employee
Name DOB id...
|
thread by: YuriyRusinov |
last post Sep 20 '07 by: YuriyRusinov
Hello !
I have database linkdb with UTF8 encoding. Script
\encoding WIN1251
begin;
\i ./database_schema.sql
|
thread by: kavi2012 |
last post Sep 20 '07 by: kavi2012
Hi all
I need to get a 2'nd top Salary from the table Employee. I don't know how to write a query for this in postgresql. Could you please help me out to write.
I tried in MSSQL. It is working fine.
select top 3 salary from employee
But it is not working in Postgre. What is the equivalent for Top in postgre.
Thanks
|
thread by: priyan |
last post Sep 20 '07 by: henryhcface
Hi all,
I want to check the difference between the truncate and delete command. I know the difference between them ie., truncate is DDL and delete is DML statement. Delete can be rollbacked know but i tried it but it does not work out.
I tried this command
update employee set name='arun' where id=1;
ROLLBACK;
|
thread by: henryhcface |
last post Sep 20 '07 by: henryhcface
i am so sorry! the english is not my mother language.
but i need everyone help actually.
it takes 16 seconds to query the this sql
SELECT count(*) FROM Sold_Listing_V as slv WHERE slv.Is_Paid ='1'
so , we ask for help
the sold_listing_v is a View ,
|
thread by: bennyg96 |
last post Sep 19 '07 by: bennyg96
Hi there,
to make it short, my server crashed some days ago, and I could only save the data folder of one tablespace, witch was located on another HDD. Now I am trying to restore my database, but it does not work!
What I did:
Installed postgresql-8.2
created an new tablespace named as it was before
created a new database named as it was...
|
thread by: glubber |
last post Sep 19 '07 by: glubber
I have a cronned perl script that runs on a different server.
when I try to restore it to the server below things dont copy across correctly.
the target server is described below.
debian 4.0 - Linux testbox.jumboentertainment.com.au 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux
with the latest apt-get installation of...
|
| |
thread by: priyan |
last post Sep 19 '07 by: priyan
hai all,
If anybody know please help me to how to use array in a function and how to return a integer array from a function
thanks in advance
priyan.
|
thread by: thefreecat |
last post Sep 19 '07 by: thefreecat
I wrote a function to list the content of a group :
create or replace function members(int,char)
returns setof int as...
To list the content of group 2 I execute :
select * from members(2,'*') memberid;
Now I want to list all the members of each group but I can't figure out the correct syntax (despite several semantically heretic tries)....
|
thread by: Adam Smith |
last post Sep 18 '07 by: HansH
Hello,
Been away from PostgreSQL for a while and probably needs retraining in
the basics.
How do I close a database? Can't even find it in the Manual
Case:
testdb=#
testdb=# EXIT;
ERROR: syntax error at or near "EXIT" at character 1
|
thread by: bogie |
last post Sep 18 '07 by: bogie
Hi again
I have another question, I would like to add NOT NULL column in my table. I have done like this :
ALTER TABLE patent ALTER COLUMN patent_pri_date SET NOT NULL;
but it doesn't work and give the following error :
ERROR: ALTER TABLE: Attribute "patent_pri_date" contains NULL values
is any body can help me how can i add NOT NULL...
|
thread by: coolminded |
last post Sep 17 '07 by: coolminded
i am using vb6 and postgresql. i have connected this with odbc.
i have created two databases, one test1 and next is test2
when i create a database as
CREATE DATABASE test1
WITH OWNER = postgres
ENCODING = 'SQL_ASCII'
TABLESPACE = pg_default;
it works fine, it is connected through vb6
|
thread by: Mitramirsa |
last post Sep 15 '07 by: rski
I want to write a trigger so that rows deleted from the table are logically-deleted, rather than being actually removed. That is, such rows are marked as being deleted, rather than actually being deleted from the table.
in sql server I know that we can use INSTEAD OF DELETE trigger but I don`t know how can I do the same action in PostgreSQL....
|
thread by: bogie |
last post Sep 13 '07 by: bogie
Dear Postgresql forum,
I have some question related to the rules in postgresql. I have a table invention with the following rules
Rules : rule_invention_insert,
rule_invention_update,
rule_invention_delete.
I need to know the inside of this rule, i mean how the relation and so on. Is there any command to see the...
|
thread by: edwige |
last post Sep 13 '07 by: rski
I just installed PostgreSQL on ubuntu linux. the installer does everything for, but I try to use "createuser" I get this message: { FATAL: role "root" does not exist }
I have tried different suggestions from the Net, nothing seems to work. How do I correct the problem?
|
| |
thread by: henryhcface |
last post Sep 13 '07 by: rski
i use the comman , initdb in my postgresql
as followers
initdb henryDB
means ,i want to create the database henryDB
but wrong .syntax error at or near "initdb" at character 1
|
thread by: sokoun |
last post Sep 13 '07 by: henryhcface
Hi all,
could you tell me about the differences between MySQL and PostgreSQL in term of datatype?
thanks.
|
thread by: kavi2012 |
last post Sep 12 '07 by: rski
Hi all
I want to know how to write a Stored Procedure and triggers in PostgreSql.
If anybody know please send me..
Thanks
Kavitha
|
thread by: kavi2012 |
last post Sep 12 '07 by: amitpatel66
Hi All
I want to Retrieve Records from the table based on the DOB. All the Dateformat in mm/dd/yyyy. I am using PostGreSql 8.2
Table: Employee
-------------------------
id Bigserial
name Character Varying
DOB TimeStamp without Timezone
|
thread by: rajinder arora |
last post Sep 12 '07 by: rajinder arora
when the statement level triggers are used can you give an example where it can be implemented?
|
thread by: priyan |
last post Sep 11 '07 by: priyan
hi all,
I am having a doubt of how to write a function for my situation.
I am having two tables
portfolioscrip
portfolioscripdetails
i have to insert into portfolioscripdetails that table is having a column called portfolioscripid and portfolioscripdetailsid portfolioscripdetailsid is the auto generated column and...
|
thread by: henryhcface |
last post Sep 10 '07 by: henryhcface
now i have a question, because in our project
some tables have too records ,so the speed of the run application is
very slow ,
we plan to use partition table. but what can we do ?
the restriction condition as followers
the original data in the table ,
|
thread by: thatguyNYC |
last post Sep 9 '07 by: thatguyNYC
Hello--
I wrote an application in Visual Foxpro 8 that reads data from another app's database (Advantage). Recently, tho, that app has changed its backend to PostgreSQL, so I need to update my VFP app to read from PostgreSQL.
I've installed the psqlODBC (8.2.4) driver and can connect and read from the database. The trouble I'm having is...
|
| |
thread by: coolminded |
last post Sep 6 '07 by: rski
hi all,
i am using POSTGRES 8.0.0 .
when clicked on the server it shows databases, groups, users.
what i want to know is what is the use of those groups and users. i can't get anything in the help too.
so if somebody could clear me what this really means what is the use of it, it will be very greatful.
thanx
|
thread by: bogie |
last post Sep 6 '07 by: bogie
Hello
I have some problem to change my column data type in my table property from character(15) to character(100). I use Postgresql 7.4.
The problem is I try to make new column with charcater(100) then i copy the data from teh original column to the new column, then i try to drop the column but i get the following ERROR : Cannot drop table...
|