Re: [GENERAL] pgadmin

2006-03-25 Thread A. Kretschmer
am 25.03.2006, um 14:12:16 +0100 mailte Peter Eisentraut folgendes: > Am Freitag, 24. März 2006 18:48 schrieb A. Kretschmer: > > am 24.03.2006, um 19:13:56 + mailte Mary Adel folgendes: > > > Is the server running on host "xxx.xxx.xxx.xxx" and accepting > >

Re: [GENERAL] how to use pg_dump in windows xp

2006-03-31 Thread A. Kretschmer
am 31.03.2006, um 18:08:55 +0530 mailte deepak pal folgendes: > hi > i have to create a database script file using pg_dump ,but i do not > understant how to run it under windows enviornment plz hep me and replay mee > soon... execute it via psql, start psql and then \i your_scri

Re: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-03 Thread A. Kretschmer
am 03.04.2006, um 17:20:56 +0530 mailte deepak pal folgendes: > hi > i am trying to make script file for my database by using pg_dump in If you want to write your own scriptfiles, you should better use a editor for this. > windows as u say i open psql to postgres then a prompt postgres# open

Re: [GENERAL] what is this error

2006-04-03 Thread A. Kretschmer
am 03.04.2006, um 13:40:45 + mailte venu gopal folgendes: > Dear List, > I have created a database called dhis13 and created a login role with > user name venu and pwd gis now i have created an sql file using shp2pgsql > command it worked successfully when i m importing the same to the d

Re: [GENERAL] what datatype is for autonumbering.in postgress

2006-04-03 Thread A. Kretschmer
am 04.04.2006, um 10:07:58 +0530 mailte deepak pal folgendes: > hi > i have to make ine field autonumber field what datatype should be used..?? > plz reply meee.. You can use serial data types for this, read http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-SERIAL > On 4/3

Re: [GENERAL] Migrating data from Oracle 9i to PostgreSQL

2006-04-04 Thread A. Kretschmer
am 04.04.2006, um 14:01:30 +0200 mailte [EMAIL PROTECTED] folgendes: > > Hi :-) > > I sure hope I'm asking in the right place... > > Is there any automated or semi-automated way of migrating data from Oracle > database (9.2.0.4) to PostgreSQL one? http://techdocs.postgresql.org/#convertfrom

Re: [GENERAL] functions behaviours

2006-04-04 Thread A. Kretschmer
am 04.04.2006, um 15:02:19 +0200 mailte [EMAIL PROTECTED] folgendes: > Hi All! > > I'm wondering if there is an elegant way to add simple behaviours to stored > Postgres functions. > > 1. First, what I want to get here is a function which orders their > results columns in ASC at one time and in

Re: [GENERAL] how to select second heigest salary...

2006-04-05 Thread A. Kretschmer
am 06.04.2006, um 10:19:21 +0530 mailte deepak pal folgendes: > hi > how to select second heigest salary from employee table field are > id,name ,salary...plz help *untested* select id, name, salary from employee order by salary desc limit 1 offset 1; http://www.postgresql.org/docs/curre

Re: [GENERAL] Performance UPDATE/INSERT

2006-04-11 Thread A. Kretschmer
am 11.04.2006, um 11:08:57 +0200 mailte MG folgendes: > Hello, > > I have about 100 000 records, which need about 30 minutes to write them with > single INSERTs into PostgreSQL. You should better use the COPY - command for bulk inserts. This is faster. HTH, Andreas -- Andreas Kretschmer(

Re: [GENERAL] Performance UPDATE/INSERT

2006-04-11 Thread A. Kretschmer
0 Records, a simple table with 2 int-columns. Have you run vacuum? Which version? Can you tell us the explain for the update? > > Greetings > Michaela > > - Original Message - From: "A. Kretschmer" Please, no silly TOFU. HTH, Andreas -- Andreas Kretschmer(Ko

Re: [GENERAL] Performance UPDATE/INSERT

2006-04-11 Thread A. Kretschmer
am 11.04.2006, um 12:15:41 +0200 mailte Alban Hertroys folgendes: > MG wrote: > >I have to improve the performance of the UPDATES and I was wondering why > >the UPDATEs need twice as long as the INSERTs. > > IIRC, an UPDATE is a DELETE/INSERT combo. That's because the original > record still ne

Re: [GENERAL] Regex with patterns in table field

2006-04-13 Thread A. Kretschmer
am 13.04.2006, um 12:47:38 + mailte pgdb folgendes: > > > > > Hi, >   > like to know how, if possible, for patterns > as attribute in a table to be used in a regex search with a > fixed string. The query should therefore return the rows that > have matching patterns with the single text.

Re: [GENERAL] select with date_part and month failure....

2006-04-18 Thread A. Kretschmer
am 18.04.2006, um 9:20:50 +0200 mailte P.MO folgendes: > > > Hello > > I have the same problem against various PostgreSQL 8.1.3, 8.0.2 and 7.4.7: > > I have a table containing periodical invoices. it contain's the last time the > invoce was printed and a period in month to be waited before n

Re: [GENERAL] Query to check existence of stored procedure?

2006-04-18 Thread A. Kretschmer
am 18.04.2006, um 8:26:49 +0200 mailte Alexander Scholz folgendes: > Hi Newsgroup, > > I need a query which can check for the existence of a certain stored > procedure. proname in pg_proc. select count(*) from pg_proc where proname = 'your_function'; HTH, Andreas -- Andreas Kretschmer(K

Re: [GENERAL] to know

2006-04-24 Thread A. Kretschmer
am 24.04.2006, um 12:42:43 +0530 mailte karthick muthu folgendes: > hello guys, > what do u think about the near future of postgre? http://www.postgresql.org/about/ > what is the latest version of postgre? and how it differ from the oldone? http://www.postgresql.org/ -> latest releases and ht

Re: [GENERAL] isnumeric - checking if text variable is convertable to numeric

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 2:01:49 -0700 mailte SunWuKung folgendes: > I tried this but couldn't find out what would be the WHEN condition for > > Select Cast('asdf' as numeric) > ERROR: invalid input syntax for type numeric create or replace function check_numeric(varchar) returns bool as $$ declare

Re: [GENERAL]

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 20:33:39 -0700 mailte Mike Kim folgendes: > Hello, > > I was wondering if anybody know a tool or postgres > command which would allow me to see how much data is > written to hardrive and read from hardrive by Postgres Take a look into the information schema, there are table li

Re: [GENERAL] How to define + operator for strings

2006-04-28 Thread A. Kretschmer
am 28.04.2006, um 12:59:25 +0300 mailte Andrus folgendes: > I want to create portable code which runs in other dbms without > modification. > > Unfortunately this other dbms uses + for string concatenation and has no way > to define operators. > > How to define + operator as alias of || operat

Re: [GENERAL] The planner chooses seqscan+sort when there is an

2006-05-03 Thread A. Kretschmer
am 03.05.2006, um 20:20:55 +0200 mailte Florian G. Pflug folgendes: > >of the index scan ? The table is quite big, might be possible. I still > >wonder why would be seqscan+sort faster than index scan... the sort will > >for sure have to write to disk too given the size of the table... > > When u

Re: [GENERAL] Database limits

2006-05-08 Thread A. Kretschmer
am 08.05.2006, um 13:14:26 +0200 mailte Q Beukes folgendes: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hey, > > What ways are there to limit the sizes of a database? You can use filesystem-quotas for your data-partition and/or you can ask the information_schema about the size of your

[GENERAL] Feature-Request: Login-Procedure

2006-05-11 Thread A. Kretschmer
Hello, Someone asks for a Login-Procedure like Sybase: set OPTION PUBLIC.LOGIN_PROCEDURE='meine_tolle_prozedur'; I think, this i possibly a nice feature, either per user or for all users. We have a 'ALTER USER name SET parameter ...', simply add a new Parameter 'login_procedure' and call this

Re: [GENERAL] Feature-Request: Login-Procedure

2006-05-11 Thread A. Kretschmer
am 11.05.2006, um 11:56:51 +0200 mailte Tino Wildenhain folgendes: > A. Kretschmer schrieb: > >Hello, > >Someone asks for a Login-Procedure like Sybase: > > set OPTION PUBLIC.LOGIN_PROCEDURE='meine_tolle_prozedur'; > >I think, this i possibly a nice feature

Re: [GENERAL] Feature-Request: Login-Procedure

2006-05-11 Thread A. Kretschmer
am 11.05.2006, um 12:30:13 +0200 mailte Tino Wildenhain folgendes: > >>I wonder what this procedure should do? :-) > >For instance: > >- the database-administrator can set a flag in one table to deny > > user-logins, a syste-wide logon-proc can check this flag. > > say like pg_hba.conf? ;) Yes,

Re: [GENERAL] Pass in variable from user???

2006-05-15 Thread A. Kretschmer
am 13.05.2006, um 14:15:52 -0700 mailte [EMAIL PROTECTED] folgendes: > Using PL/PGSQL, I am trying to create a procedure to display the count > of rows in any single table of a database. The End-user would pass in a > table name and the prodecure would display the table name with the row > count.

Re: [GENERAL] problems with postgresql 9

2006-05-16 Thread A. Kretschmer
am 16.05.2006, um 11:18:09 +0200 mailte Alban Hertroys folgendes: > romeo midhun wrote: > > hi friends, > >Why the 'oid' column reference doesn't work with postgresql 9.x? > > Hiya, time traveller. You ended up in the wrong year; PostgreSQL 9 doesn't > exist yet. ;-) Btw.: if you need the oid,

Re: [GENERAL] column order

2006-05-24 Thread A. Kretschmer
am 24.05.2006, um 21:54:25 +0900 mailte Michael Glaesemann folgendes: > > On May 24, 2006, at 11:54 , nuno wrote: > > >does postgresql guarantee you that > >the columns in the result set would be ordered > >as specified in the query (i.e. id, firstname, lastname, dob) ? > > No. If you want a sp

Re: [GENERAL] Incomplete dump?

2006-05-26 Thread A. Kretschmer
am 26.05.2006, um 14:33:37 +0200 mailte Benno Pütz folgendes: > >I don't remember which version of pg_dump started adding that trailer. > >If it's an old copy then maybe you're OK. If it should have a trailer > >and doesn't then you're right to be suspicious. > This may well be the reason, The

Re: [GENERAL] Syntax question

2006-05-26 Thread A. Kretschmer
am 26.05.2006, um 9:09:25 -0700 mailte John Taylor folgendes: > I have a select statement that goes as follows: > > SELECT * FROM product prod, prod_alias pa, category cat, company co > WHERE prod.catid = cat.catid > AND prod.coid = co.coid > AND prod.prodid = pa.prodid; > > If possibl

Re: [GENERAL] National Number to text conversion

2006-05-29 Thread A. Kretschmer
am 29.05.2006, um 17:09:10 +0200 mailte Samer Abukhait folgendes: > Hello, > > is there any known way to convert numbers to their text equivalent in > English and other languages? > > like 25 --> Twenty Five IIRC i have @work a book about sed and awk, and, iirc, there are a code for awk or sed

Re: [GENERAL] out parameter and setof record

2006-05-30 Thread A. Kretschmer
am 30.05.2006, um 3:21:27 -0700 mailte [EMAIL PROTECTED] folgendes: > In PostgreSql 8.1 i've tried to use Out parameter but when I've changed > function (added Out parameter) > ... > > ERROR: function result type must be integer because of OUT parameters > > > Of course when I change

Re: [GENERAL] How to link database A in server X to database B in server Y?

2006-05-30 Thread A. Kretschmer
am 31.05.2006, um 5:30:45 + mailte liu long folgendes: > hi all, > > At the first, please let me say sorry for my poor english. > > I have two postgresql database(A and B) running in different machines(X and > Y). I want to visit tables of B from A as if they are tables of A, could > you

Re: [GENERAL] help with rules please

2006-06-07 Thread A. Kretschmer
am 07.06.2006, um 13:23:09 +0200 mailte peter pilsl folgendes: > > I dont succeed with writing my rules proper. > > I need the following rules: > > when I INSERT/UPDATE to a table and a certain condition is true then a > special field in this data-row should be updated to. > > > I came as fa

Re: [GENERAL] Logging and Viewing SQL History

2006-06-10 Thread A. Kretschmer
am 10.06.2006, um 14:09:36 -0500 mailte Adam folgendes: > I tried searching for this but didn't see anything. > > Is there a way I can see the last 5 or last 1 SQL statements that have been > run on the server? I'm using 8.1.3 ---(end of 'log_statement = all' in your

Re: [GENERAL] can i use a string in where clause such as "id in (str)"

2006-06-11 Thread A. Kretschmer
am 12.06.2006, um 0:05:07 +0300 mailte Yavuz Kavus folgendes: > hi every body. > i have a pl/pgsql function (i want to form it to run correctly) : > > CREATE OR REPLACE FUNCTION "public"."ftest" () RETURNS boolean AS > $body$ > declare >f boolean; >str varchar(100); > begin >

Re: [GENERAL] Copy content from dbs

2006-06-14 Thread A. Kretschmer
am 14.06.2006, um 13:56:06 +0200 mailte Guido Neitzer folgendes: > Hi. > > Is there an easy way to copy the content including the table structure, > indexes and so on from one db to another? Create the new db with the old db as template. Andreas -- Andreas Kretschmer(Kontakt: siehe Head

Re: [GENERAL] SELECT statement takes 10 minutes to answer

2006-06-21 Thread A. Kretschmer
am 19.06.2006, um 5:26:54 -0700 mailte Mustafa Korkmaz folgendes: > Hi, > > Iam using PostgreSQL 7.4.5 on a linux machine, and have the problem > that an easy "SELECT field1, field2, field3 FROM a_table"-statement Hey, read my answer on your question in the news, MID <[EMAIL PROTECTED]> ;-) A

Re: [GENERAL] stored procedure which return a select result

2006-06-30 Thread A. Kretschmer
am 01.07.2006, um 7:47:09 +0200 mailte Alain Roger folgendes: [ Problems with set returning functions ] > Could you give me some piece of code for such use ? http://www.varlena.com/GeneralBits/26.php There are any examples. HTH, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heyni

Re: [GENERAL] php can't connect to postgresql server

2006-07-03 Thread A. Kretschmer
am 03.07.2006, um 10:25:29 -0300 mailte Clodoaldo Pinto folgendes: > $conn_string = "hostaddr=127.0.0.1 port=5432 dbname=dbname ^ > I can connect as that user with psql: > > $ psql -h localhost -U username dbname ^ Try 'localhost' instead '

Re: [GENERAL] Problem with COPY

2006-07-10 Thread A. Kretschmer
am 10.07.2006, um 10:21:59 +0200 mailte Christian Rengstl folgendes: > Hi everyone, > > I have a table with a surrogate key which is an integer sequence. Is > there a way to load a file using COPY and tell postgresql not to > insert into the primary key column? Yes: test=# create table foobar (

Re: [GENERAL] A function which returns all rolname from pg_roles.

2006-07-10 Thread A. Kretschmer
am 10.07.2006, um 19:27:38 -0700 mailte Karen Hill folgendes: > How do I make this function work? I am trying to get all the rolnames > from pg_roles. > > CREATE OR REPLACE FUNCTION test() SETOF name AS $$ > DECLARE > rrol name; > BEGIN > SELECT rolname INTO rrol FROM pg_roles; > RETURN setof r

Re: [GENERAL] Problem with COPY

2006-07-11 Thread A. Kretschmer
am 11.07.2006, um 9:24:06 +0200 mailte Christian Rengstl folgendes: > Hi again everyone, > > i got it to work, but came across another question concerning COPY. If > i have a column in a text file that i do not want/need in the > database, is there a way not to read that column from the file wit

Re: [GENERAL] How to access a table from one database to another database

2006-07-14 Thread A. Kretschmer
am 15.07.2006, um 10:26:55 +0530 mailte VivekanandaSwamy R. folgendes: > Now i am in PAO database..now i want access table 'activity' in schema > 'cas' in CAS database. > How it is posible. > ... > How access table from one server to another server? 08:02 < akretschmer> ??dblink 08:02 < rtfm_ple

Re: [GENERAL] Splitting Timestamps

2006-07-25 Thread A. Kretschmer
am 25.07.2006, um 12:54:35 -0400 mailte Chris Hoover folgendes: > I have several columns in my database that are timestamps. My developers > are asking me how to split the timestamp so that they can look at either > the > date or at the time portion. The CAST-Operater is your friend: est=# sel

Re: [GENERAL] question about default value and timestamp

2006-07-25 Thread A. Kretschmer
am 26.07.2006, um 7:26:09 +0200 mailte Christian Rengstl folgendes: > Hi list, > > i have a table with a column where the default value is > current_timestamp, but somehow all the tuples (around 8.000.000) have > the same timestamp, which is, honestly speaking, not what i intended > to do. So is

Re: [GENERAL] Update entire column with new date values

2006-07-27 Thread A. Kretschmer
am 27.07.2006, um 10:17:48 -0500 mailte Weiss, Kevin folgendes: > I need to update the date for each file (the "date" & "filename" > columns). However, the updated values for date are not the same for each > file (due to when the files were last modified). I can import the new > date values from a

Re: [GENERAL] Query questions

2006-07-31 Thread A. Kretschmer
am 31.07.2006, um 15:32:19 +0200 mailte Christian Rengstl folgendes: > Hi list, > > i have a problem with creating a query and i hope somebody can give me > some hints. I have the following table > pid(varchar), crit(varchar), val1(varchar), val2(varchar), > iDate(timestamp) > where there are up

Re: Antw: Re: [GENERAL] Query questions

2006-07-31 Thread A. Kretschmer
am 31.07.2006, um 15:55:39 +0100 mailte Richard Huxton folgendes: > Christian Rengstl wrote: > >My version is 8.1.4. Here is the plan for the query, it's performed on a > >Total runtime: 1903.894 ms > >And yes i have indexes on both pid (varchar(15)) and crit(va

Re: [GENERAL] Strange error message

2006-08-02 Thread A. Kretschmer
am 02.08.2006, um 9:27:22 +0200 mailte Christian Rengstl folgendes: > Postgre copied the file 0001002000D2 to the specified directory > and now it says it can't be copied...I really, really don't get it! My guess: Access Denied on the filesystem for the postgres-User. PS.: Windows,

Re: [GENERAL] unique constraint when updating tables

2006-08-22 Thread A. Kretschmer
am Tue, dem 22.08.2006, um 8:39:00 +0800 mailte gao iqiang folgendes: > Hello, > I met the following problem when i am using PostgreSQL as a backend > database: > I have a table "tabrel(a int primary key, b int)", and now there are for > example 100 records with column 'a' be from 1 to 10

Re: [GENERAL] Installation Help needed

2006-08-23 Thread A. Kretschmer
am Wed, dem 23.08.2006, um 2:55:37 -0700 mailte shrini folgendes: > Folks. > I installed postgresql in my RHEL Server. Which version? > "nmap " from any client dows not show the 5432 port. > No firewall is running in te server. > > How to remote access the postgresql server? Edit your postgr

Re: [GENERAL] Perl language creation failed

2006-08-27 Thread A. Kretschmer
am Mon, dem 28.08.2006, um 1:25:51 -0400 mailte Harpreet Dhaliwal folgendes: > Hi, > I'm trying the following > > CREATE LANGUAGE plperl > before executing my functions written in perl > but get the follwing error > > ERROR: could not access file "$libdir/plperl": No such file or directory >

Re: [GENERAL] Serial Updating

2006-09-03 Thread A. Kretschmer
am Sun, dem 03.09.2006, um 14:24:41 -0700 mailte Bob Pawley folgendes: > I have a column that I wish to use to designate loop numbers. > > A loop number is composed of a letter (F for flow, T for temperatures etc.) > followed by a sequence number starting at one and ending with the last loop. >

Re: [GENERAL] PostgreSQL books for beginner

2006-09-08 Thread A. Kretschmer
am Thu, dem 07.09.2006, um 15:58:14 -0400 mailte venkata rao folgendes: > could you suggest good books for a beginner learning PostgreSQL database. Visit our homepage and read http://www.postgresql.org/docs/books/ HTH, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7

Re: [GENERAL] remote duplicate rows

2006-09-13 Thread A. Kretschmer
am Wed, dem 13.09.2006, um 15:46:58 -0700 mailte Junkone folgendes: > hI > i have a bad situation that i did not have primary key. so i have a > table like this > colname1colname2 > 1 apple > 1 apple > 2

<    3   4   5   6   7   8