Re: [GENERAL] 'order by' in an insert into command

2004-09-08 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > In your example, I would expect the nextval() to be called during the > "fetch", before the ordering. You could probably do something like: > INSERT INTO pending_tnmt_sec > SELECT foo.*, nextval('sec_seq') FROM >( > SELECT tseceventid, ... >

Re: [GENERAL] Heritage

2004-09-08 Thread Oliver Elphick
On Wed, 2004-09-08 at 14:27, Sebastian Davancens wrote: > Hi everyone. Im having a problem with heritage. ... whatever that might be... > The situation is the following: > I have two tables, tbl_everyone and tbl_employees. tbl_employees > inherits from tbl_everyone. > In tbl_everyone, i store so

[GENERAL] test

2004-09-08 Thread Dennis Gearon
I don't seem to see my messages in the digest. Is this a mail setting? I thought that only blockable in the single message mode. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail comma

Re: [GENERAL] import mysql database...

2004-09-08 Thread Scott Marlowe
On Wed, 2004-09-08 at 09:07, Eric wrote: > Hi, > > I have a running PHPBB mySQL dump that I would like to load/import in > postgreSQL... I didn't try yet but I wonder if it's straightforward and > just import the mySQL dump into postgreSQL ? > > (Of course, I want to migrate PHPBB running on a se

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-08 Thread Bruno Wolff III
On Wed, Sep 08, 2004 at 00:33:39 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > > I've been hearing rumblings that MD5 and all other known crypto > protocols are known vulnerable since the latest crypto symposiums. > (Not that we didn't all suspect the NSA et al could break 'em, but > now they've

Re: [GENERAL] 'order by' in an insert into command

2004-09-08 Thread Richard Huxton
Mike Nolan wrote: I have the following insert to populate a new table: insert into pending_tnmt_sec select tseceventid, tsecsecno, nextval('sec_seq'), tsecrtddt from tnmtsec order by tsecrtddt,tseceventid,tsecsecno; I need to access this data in a particular order which may change over time but the

Re: [GENERAL] 'order by' in an insert into command

2004-09-08 Thread Jean-Luc Lachance
Try: insert into pending_tnmt_sec select tseceventid, tsecsecno, nextval('sec_seq'), tsecrtddt from ( select tseceventid, tsecsecno, tsecrtddt from tnmtsec order by tsecrtddt,tseceventid,tsecsecno) as ss; Mike Nolan wrote: I have the following insert to populate a new table: insert into pend

[GENERAL] Grant Issues with groups

2004-09-08 Thread UMPA Development
Hello all, I have setup 2 groups on a database: admin users I have granted all on testing to admin and tried to grant select on testing to users; If I do a \d as an admin I see the schema if i do it as user I see nothing.. If i select * from testing i see everything in the table as a admin but if

Re: [GENERAL] SQL query - single text value from group by

2004-09-08 Thread mike
On Wed, 2004-09-08 at 17:13 +0100, Richard Huxton wrote: > mike wrote: > > Hi > > > > I am trying to work out if this is possible in a select query > > > > I have a group by query which could result in several rows, what I want > > to do is do a text equivalent of a sum() eg: > > > > SELECT sum(

[GENERAL] 8.0.0beta2: gcc: unrecognized option `-pthreads'

2004-09-08 Thread Ed L.
Is this pthreads warning of any concern? gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fpic -shared -Wl,-soname,libecpg.so.4 execute.o typename.o descriptor.o data.o error.o prepare.o me

[GENERAL] 'order by' in an insert into command

2004-09-08 Thread Mike Nolan
I have the following insert to populate a new table: insert into pending_tnmt_sec select tseceventid, tsecsecno, nextval('sec_seq'), tsecrtddt from tnmtsec order by tsecrtddt,tseceventid,tsecsecno; I need to access this data in a particular order which may change over time but the initial order I

Re: [GENERAL] Problems importing data from plain text file

2004-09-08 Thread gnari
From: "Mário Gamito" <[EMAIL PROTECTED]> > I have this plain text file with about 5000 lines. > Each line may have 4 or 5 fields, all delimited with a tab. > > I've made a table named t_zip_codes with 5 fields. > > When i run (in postgres command line) the command > > COPY t_zip_code FROM zip_code

Re: [GENERAL] SQL query - single text value from group by

2004-09-08 Thread Richard Huxton
mike wrote: Hi I am trying to work out if this is possible in a select query I have a group by query which could result in several rows, what I want to do is do a text equivalent of a sum() eg: SELECT sum(inv_id),date,cust from invoice group by date,cust Is there any way to get to a single concat

[GENERAL] SQL query - single text value from group by

2004-09-08 Thread mike
Hi I am trying to work out if this is possible in a select query I have a group by query which could result in several rows, what I want to do is do a text equivalent of a sum() eg: SELECT sum(inv_id),date,cust from invoice group by date,cust Is there any way to get to a single concatenated in

Re: [GENERAL] import mysql database...

2004-09-08 Thread Richard Huxton
Eric wrote: Hi, I have a running PHPBB mySQL dump that I would like to load/import in postgreSQL... I didn't try yet but I wonder if it's straightforward and just import the mySQL dump into postgreSQL ? (Of course, I want to migrate PHPBB running on a server with mySQL to another server running wit

Re: [GENERAL] import mysql database...

2004-09-08 Thread Arthur Hoogervorst
Hi, You may find something here: http://www.rot13.org/~dpavlin/sql.html. In addition, I always thought that Postgres came with a MySQL to Postgres converter, but I might be wrong. Bye, Arthur On Wed, 08 Sep 2004 11:07:46 -0400, Eric <[EMAIL PROTECTED]> wrote: > Hi, > > I have a running PHPBB

Re: [GENERAL] import mysql database...

2004-09-08 Thread Greg Donald
On Wed, 2004-09-08 at 10:07, Eric wrote: > Hi, > > I have a running PHPBB mySQL dump that I would like to load/import in > postgreSQL... I didn't try yet but I wonder if it's straightforward and > just import the mySQL dump into postgreSQL ? > > (Of course, I want to migrate PHPBB running on a se

[GENERAL] import mysql database...

2004-09-08 Thread Eric
Hi, I have a running PHPBB mySQL dump that I would like to load/import in postgreSQL... I didn't try yet but I wonder if it's straightforward and just import the mySQL dump into postgreSQL ? (Of course, I want to migrate PHPBB running on a server with mySQL to another server running with postgreS

[GENERAL] Need Help in interface..

2004-09-08 Thread Ashok......
Dear Group. I want to read vrml file and store the same in the postgresql.So please send me some links or solution to achieve this. Ashok Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!

Re: [GENERAL] How to determine a database is intact?

2004-09-08 Thread Tom Lane
Wes <[EMAIL PROTECTED]> writes: > There's more than 250 million rows. If I remember right, it's ballpark 25% > data reload, 75% index/foreign constraint rebuild. Pg_dumpall is something > like 3 hours or so. FWIW, increasing sort_mem for the reload process would probably help with the index and

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Tom Lane
Jerome Lyles <[EMAIL PROTECTED]> writes: > psql:create.txt4:34: ERROR: type "datetime" does not exist > Does this mean this datatype doesn't exist on this line (34) or that it > doesn't exist at all? If it doesn't exist at all what is the correct > datatype to use here? It doesn't exist at al

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-08 Thread Tom Lane
Tore Halset <[EMAIL PROTECTED]> writes: > On Sep 7, 2004, at 20:03, Tom Lane wrote: >> I suspect that it's got nothing at all to do with the traffic between >> the server and the client, and that the SIGINT is coming from some >> outside agency. > Yes, you are correct. No, I'm not ;-) > I added

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Greg Stark
Jerome Lyles <[EMAIL PROTECTED]> writes: > the/@@/ is what the whitespace is replaced with but I don't know what the @@ > stands for, It doesn't stand for anything, it just means replace with "@@". Now look again at the second and third substitution... -- greg ---(end

[GENERAL] Heritage

2004-09-08 Thread Sebastian Davancens
Hi everyone. Im having a problem with heritage. The situation is the following: I have two tables, tbl_everyone and tbl_employees. tbl_employees inherits from tbl_everyone. In tbl_everyone, i store some information about everyone who is related with the place where i work: Name, ID (PK), Birth Date

Re: [GENERAL] Function caches wrong OID of temporary table?

2004-09-08 Thread John Sidney-Woollett
Phil Endecott wrote: Dear PostgreSQL experts, I have encountered a problem with temporary tables inside plpgsql functions. I suspect that this is a known issue; if someone could confirm and suggest a workaround I'd be grateful. My function creates a couple of temporary tables, uses them, and d

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-08 Thread Tore Halset
On Sep 8, 2004, at 11:25, Tore Halset wrote: I installed beta2 on a local linux box instead and now everything is working :/ Something must trigger Mac OS X to send those evil SIGINTs. Will it happens on the linux box as well, but not that often. Grr. - Tore. ---(end of br

Re: [GENERAL] How to determine a database is intact?

2004-09-08 Thread Wes
On 9/5/04 9:04 AM, "Jan Wieck" <[EMAIL PROTECTED]> wrote: > 24 hours to do what? The pg_dumpall, the restore or both? There's more than 250 million rows. If I remember right, it's ballpark 25% data reload, 75% index/foreign constraint rebuild. Pg_dumpall is something like 3 hours or so. Wes

Re: [GENERAL] Function caches wrong OID of temporary table?

2004-09-08 Thread Oliver Elphick
On Wed, 2004-09-08 at 12:37, Phil Endecott wrote: > Dear PostgreSQL experts, > > I have encountered a problem with temporary tables inside plpgsql > functions. I suspect that this is a known issue; if someone could > confirm and suggest a workaround I'd be grateful. > > My function creates a c

[GENERAL] Function caches wrong OID of temporary table?

2004-09-08 Thread Phil Endecott
Dear PostgreSQL experts, I have encountered a problem with temporary tables inside plpgsql functions. I suspect that this is a known issue; if someone could confirm and suggest a workaround I'd be grateful. My function creates a couple of temporary tables, uses them, and drops them before retu

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Jerome Lyles
On Tuesday 07 September 2004 10:22 pm, Dorward villaruz wrote: > hi! > > try this in commandline i assume you save the file in sams.txt > final file will be sams2.txt > > cat sams.txt | sed -e 's/ /@@/g' -e 's/ //g' -e 's/@@/ /g' > sams2.txt > > or put this in a script say convert.sh > > script st

[GENERAL] Postgresql and scripting

2004-09-08 Thread Jerome Lyles
I took the white space between characters out of my script 'create.txt4' and ran it on database 'test'. There were errors: 26 27 -- Create Orders Table 28 29 CREATE TABLE Orders 30 ( 31Order_num int NOT NULL, 32Order_datedatetimeNOT NULL, 33cust_id char

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Oliver Elphick
On Wed, 2004-09-08 at 00:33, Jerome Lyles wrote: ... > Can someone point me to a sed or shell script that I can use on a text file to > remove the whitespace between the letters in the words only? Here is the > top of the script file as it stands now: > > - - C r e a t e C u s t o m e r s