[GENERAL] Which file belongs to which database?

2003-07-24 Thread Thomas Kellerer
Hello all, just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? I have looked through the documentation of the system catalogs, but couldn't find any reference to that. The field datpath in pg_database is empty in my system (7.2 on Wind

Re: [GENERAL] Can I turn the case sensitive off

2003-07-24 Thread Thomas Kellerer
Terence Chang schrieb: I am still getting the error. would this matter with 7.3.3 on windows with cygwin? From my experience I'd never user quotes at any place (neither during creation of the table nor in the SELECT, UPDATE statements). All DBMS I know behave like Postgres. So if you never quote

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Shridhar Daithankar
On 24 Jul 2003 at 10:00, Tom Lane wrote: > Richard Huxton <[EMAIL PROTECTED]> writes: > > There's a multi-year plan to "bring the code bases closer together" which > > sounds like one of those big projects that always make me nervous. > > Just between us chickens, I hope they do spend multiple m

[GENERAL] unicode char order

2003-07-24 Thread LitelWang
I create a database with unicode support with 7.3.3. I need input chinese into it .But when I get the data out with "group by" clause I found it isn't the chinese tone order .what's the order I have got ? How can I sort it as the chinese tone? ---(end of broadcast)

[GENERAL] when can I find template1 in pgadmin II?

2003-07-24 Thread LitelWang
Is this question strange?I think so .I installed postgres on cygwin platform for 3 times .There was one time I found template1 in database item of pgadmin II .It showed there were three databases, and actually I created one for my development .The other two are tempalte0 and template1 .But now I c

Re: Fw: [GENERAL] Is SQL silly as an RDBMS<->app interface?

2003-07-24 Thread Dennis Gearon
Boy! That sounds versitile! ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Can I turn the case sensitive off

2003-07-24 Thread Stephan Szabo
On Thu, 24 Jul 2003, Terence Chang wrote: > I am still getting the error. would this matter with 7.3.3 on windows with > cygwin? > > My query only works when I quote the field. Also I have to always use the > schema name in the where clause. Is there any way that I can set default > schema to "app

Re: Fw: [GENERAL] Is SQL silly as an RDBMS<->app interface?

2003-07-24 Thread Bruce Momjian
You could do something like: retrieve (a.dept, x=sum(a.total by a.dept) / sum(a.total)); if I remember correctly. --- Vincent Hikida wrote: > > - Original Message - > From: "Bruce Momjian" <[EMAIL PROTECTE

Re: Fw: [GENERAL] Is SQL silly as an RDBMS<->app interface?

2003-07-24 Thread Vincent Hikida
- Original Message - From: "Bruce Momjian" <[EMAIL PROTECTED]> To: "elein" <[EMAIL PROTECTED]> Cc: "Jan Wieck" <[EMAIL PROTECTED]>; "Vincent Hikida" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 5:35 PM Subject: Re: Fw: [GENERAL] Is SQL silly as an RDBMS<->app inte

Re: Fw: [GENERAL] Is SQL silly as an RDBMS<->app interface?

2003-07-24 Thread Bruce Momjian
Yes, it was more powerful because you could do aggregates in the query independent of the results returned by the query. The 'by' feature of aggregates always confused me because it would modify the aggregate WHERE clause (that was independent of the outer query) and restrict the aggregate to onl

Re: [GENERAL] Can I turn the case sensitive off

2003-07-24 Thread Terence Chang
I am still getting the error. would this matter with 7.3.3 on windows with cygwin? My query only works when I quote the field. Also I have to always use the schema name in the where clause. Is there any way that I can set default schema to "app_v08" but not public? Thank you very much! My table u

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Vernon Smith
Good to learn PG, in fact, is faster than SAP DB. But how the figure 2.487 comes up? A single select statement or something else? - Original Message - DATE: Thu, 24 Jul 2003 11:00:30 From: Richard Huxton <[EMAIL PROTECTED]> To: Mike Mascari <[EMAIL PROTECTED]>, [EMAIL PROTECTED]

Re: [GENERAL] Limited varchar, unlimited varchar, or text?

2003-07-24 Thread Tom Lane
Andrew Ayers <[EMAIL PROTECTED]> writes: > Then people say "there is no difference, internally it is the same to PG". > So - why the two types? History. TEXT was there first, VARCHAR was added for spec compliance. > Personally, if such a change were to come about, I would lean toward > adding t

Re: [GENERAL] dump_all/restore times?

2003-07-24 Thread Vivek Khera
> "BM" == Bruce Momjian <[EMAIL PROTECTED]> writes: BM> Here is an applied patch that suggests increasing sort_mem during BM> restore. I though of putting it near the database restore section or in BM> the manual, but is seemed more centralized to put it near the actual BM> parameter. But no

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Vernon Smith
The following statements is based on your own experience or not? >That's fine, but my understanding of SAP DB's failure to attract a large >community was that: > - it had a lot of competition (MySQL/PG/Firebird...) It is true that there are quite some open source free DBs out there. They, how

Re: [GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread Greg Stark
Dmitry Tkach <[EMAIL PROTECTED]> writes: > The good news though is that, if you drop (or disable) your pk index That's what I did, except I had to cascade to the foreign keys and then recreate them too. And you can't really recreate a primary key constraint, you just get a unique index which I th

Re: [GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread Dmitry Tkach
Greg Stark wrote: So I have to adjust a primary key by adding one to every existing record. Obviously this isn't a routine operation, my data model isn't that messed up. It's a one-time manual operation. However when I tried to do the equivalent of: update tab set pk = pk + 1 I got ERROR: C

Re: [GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread Mike Mascari
Greg Stark wrote: > So I have to adjust a primary key by adding one to every existing record. > Obviously this isn't a routine operation, my data model isn't that messed up. > It's a one-time manual operation. > > However when I tried to do the equivalent of: > > update tab set pk = pk + 1 >

Re: [GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread scott.marlowe
On 24 Jul 2003, Greg Stark wrote: > > So I have to adjust a primary key by adding one to every existing record. > Obviously this isn't a routine operation, my data model isn't that messed up. > It's a one-time manual operation. > > However when I tried to do the equivalent of: > > update tab

Re: [GENERAL] 0/1 vs true/false

2003-07-24 Thread Andrew Ayers
Greg Stark wrote: > Instead I have to have =='f' and =='t' strewn throughout my code everywhere > making it harder to read and extremely fragile. If I forget one anywhere I > silently get subtly broken semantics. Why did you do that? Why not create a single function (isTrue()?) that you pass the

Re: [GENERAL] Limited varchar, unlimited varchar, or text?

2003-07-24 Thread Andrew Ayers
Curtis Hawthorne wrote: > According the the page there's no performance difference between the types so > I would lean towards using unlimited varchar or text to avoid having an > arbitrary limit, but are there any other hidden problems with using these > types? If not, which one should I use? I

[GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread Greg Stark
So I have to adjust a primary key by adding one to every existing record. Obviously this isn't a routine operation, my data model isn't that messed up. It's a one-time manual operation. However when I tried to do the equivalent of: update tab set pk = pk + 1 I got ERROR: Cannot insert a

Re: [GENERAL] psql -et

2003-07-24 Thread nolan
> > A macro for the print, which substitutes: > > print() > fflush() > > for a bare print is a good idea. In addition to print(), fputs() is also used in several places. Most of the \ commands appear to have their own formatting sections, so changing them to use a macro or possibly

Re: [GENERAL] psql -e

2003-07-24 Thread Dennis Gearon
In fact, this kind of development, with a test for all code to see if it is using any unwanted features of the language instead of inhouse objects, functions, and macros would have saved microsoft's butt a long time ago regarding security issues. Each new group of programmers does the exact same th

Re: [GENERAL] optimum postgres server configuration

2003-07-24 Thread scott.marlowe
On Thu, 24 Jul 2003, tom dyson wrote: > We're about to buy a new server for dedicated Postgres serving. It'll be > serving 4 - 10 databases (average dump size 20Gb) for various web > applications. What is the list's advice on optimum configuration of hardware > and software, given a smallish fixed

[GENERAL] Solaris, Postgresql and Problems

2003-07-24 Thread Errol Neal
Hi All, I have posted this before, but have not yet got any resolutions on it. I am hoping someone with experience can help me out. I am running Postgresql 7.3.2 on Solaris 5.9. I am trying to increase the number of max connections for postgresql but it but I am having some issue. After reading

Re: [GENERAL] psql -e

2003-07-24 Thread Dennis Gearon
A macro for the print, which substitutes: print() fflush() for a bare print is a good idea. And then have a routine that looks for contributions that are mistakenly NOT using the macro. [EMAIL PROTECTED] wrote: The query is printed *before* it is executed, but you might

Re: [GENERAL] optimum postgres server configuration

2003-07-24 Thread nolan
> We're about to buy a new server for dedicated Postgres serving. It'll be > serving 4 - 10 databases (average dump size 20Gb) for various web > applications. What is the list's advice on optimum configuration of hardware > and software, given a smallish fixed budget (around $US 2000)? In > particu

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Dennis Gearon
And in documentation and web support. 1/ It's hard to find a good search engine that's PG centric. And sorry, Google only works so well when doing a search for highly specific technical information. 2/ Postgres documentation does not seem to be in any of the standard, open source formats. Ta

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Dennis Gearon
Couldn't agree more: Just between us chickens, I hope they do spend multiple man-years trying to merge those two codebases. It'll keep them distracted from accomplishing anything useful . Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: There's a multi-year plan to "bring the code ba

Re: [GENERAL] psql -e

2003-07-24 Thread nolan
> I think throwing in another fflush or two would count as a bug fix. > Anything more extensive probably has to wait for the 7.5 cycle. Dealing with readline makes it slightly more complicated than that, because there is an intermingling issue with two independent output streams. In addition to a

Re: [GENERAL] quoting of array elements + sexp_out?

2003-07-24 Thread Thien-Thi Nguyen
Date: Thu, 24 Jul 2003 11:09:41 -0400 From: Tom Lane <[EMAIL PROTECTED]> (a) So that numerics don't get quoted. (b) The original coding was wrong, since its rule for deciding when to quote had nothing to do with the contents of the string being quoted, and it could thus fail to

Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-24 Thread Dennis Gearon
I've never seen this work before. the only version of this scenario that works, is to buy the competitor, and learn their code, put the competitor out of business, and force the competitor's company to use a half ass bridge version for one rev of a vision, then the next version force them to your s

[GENERAL] optimum postgres server configuration

2003-07-24 Thread tom dyson
We're about to buy a new server for dedicated Postgres serving. It'll be serving 4 - 10 databases (average dump size 20Gb) for various web applications. What is the list's advice on optimum configuration of hardware and software, given a smallish fixed budget (around $US 2000)? In particular, shoul

Re: [GENERAL] Limited varchar, unlimited varchar, or text?

2003-07-24 Thread scott.marlowe
On Thu, 24 Jul 2003, Dmitry Tkach wrote: > > > > > > After looking at the docs on the > >character datatypes I noticed that if you don't specify a limit on the varchar > >type it will accept strings of any length. If that's the case, what's the > >difference between it and text? > > > > > Actua

Re: [GENERAL] Limited varchar, unlimited varchar, or text?

2003-07-24 Thread Dmitry Tkach
Curtis Hawthorne wrote: Hi, I'm setting up a table for a new project and have a question about choosing a data type for one of the columns. It will be for a username that is retrieved from an LDAP server. I know that I'll want to use either varchar or text. The problem with using varchar is I

Re: [GENERAL] quoting of array elements + sexp_out?

2003-07-24 Thread Tom Lane
Thien-Thi Nguyen <[EMAIL PROTECTED]> writes: > my question is: why this make-work change? (a) So that numerics don't get quoted. (b) The original coding was wrong, since its rule for deciding when to quote had nothing to do with the contents of the string being quoted, and it could thus fail to q

Re: [GENERAL] Limited varchar, unlimited varchar, or text?

2003-07-24 Thread Dmitry Tkach
After looking at the docs on the character datatypes I noticed that if you don't specify a limit on the varchar type it will accept strings of any length. If that's the case, what's the difference between it and text? Actually, I'd like to know this too :-) I think that there is no difference

Re: [GENERAL] List last value of all sequences

2003-07-24 Thread btober
> This will work in most cases: > > SELECT c.relname, > setval(c.relname, CASE WHEN nextval(c.relname) > 1 THEN > currval(c.relname)-1 ELSE 1 END,'true') > FROM pg_class c WHERE c.relkind='S'; > The main problem with this approach is that, while you get the "current value", the sequence is incre

Re: [GENERAL] psql -e

2003-07-24 Thread Tom Lane
[EMAIL PROTECTED] writes: > Tom, would rewriting the output sections interfere with any changes > you are/were working on in psql? I'm not doing anything with psql ... Peter might be ... > I probably won't have time to work on > this before August 15th at this point, so maybe I should wait until

Re: [GENERAL] List last value of all sequences

2003-07-24 Thread greg
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work in most cases: SELECT c.relname, setval(c.relname, CASE WHEN nextval(c.relname) > 1 THEN currval(c.relname)-1 ELSE 1 END,'true') FROM pg_class c WHERE c.relkind='S'; It works for simple sequences in which the number is incremented

[GENERAL] quoting of array elements + sexp_out?

2003-07-24 Thread Thien-Thi Nguyen
greetings, previously (7.1.x), an array of text would be returned: {"d","e","f"} but w/ 7.3.3 i see: {d,e,f} there is mention of this in section 5.12 "Arrays" of the manual, including the unfriendly consequence: callers must be able to handle either case. my question is: why t

Re: [GENERAL] psql -e

2003-07-24 Thread nolan
> > The query is printed *before* it is executed, but you might not see it > > because your terminal is not flushing the stdout at the right times. > > thanks , > shud there be a fflush then after that print? > or there is something i can do on the shell itself? I've been looking into the echo fe

Re: [GENERAL] List last value of all sequences

2003-07-24 Thread Richard Huxton
On Thursday 24 July 2003 13:46, [EMAIL PROTECTED] wrote: > I'm interested in producing a list of all sequence names and the > corresponding last value. Starting with a list of sequence names > generated by > > SELECT c.relname FROM pg_class c WHERE (c.relkind = 'S'); [snip] > So my next try used a