Re: [SQL] No triggers visible for different user in information_schema.triggers

2005-02-18 Thread Peter Eisentraut
le to" is defined by other information schema tables where superuserdom cannot be represented. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Multiples schemas

2005-03-02 Thread Peter Eisentraut
Am Mittwoch, 2. MÃrz 2005 12:30 schrieb [EMAIL PROTECTED]: > Could I create a multi schema into another schema ??? or is there only one > level for schema sctructs? No and yes. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of bro

Re: [SQL] lower and unicode

2005-03-17 Thread Peter Eisentraut
pginfo wrote: > I am uusing pg 8.0.1 on FreeBSD 5.3 but I am ready t use the version > taht supports correct unicode. FreeBSD doesn't support Unicode, so you need to use something else. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end o

Re: [SQL] encoding

2005-05-07 Thread Peter Eisentraut
sion that has the --enable-locale option then you rather need to upgrade. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] ENUM like data type

2005-06-29 Thread Peter Eisentraut
ike. I suppose in practice this won't matter too much, but it can't be called a clean design. What you'd really need is a way to create a distinct type. SQL has a feature for that, but PostgreSQL hasn't implemented it. -- Peter Eisentraut http://deve

Re: [SQL] ENUM like data type

2005-06-30 Thread Peter Eisentraut
something like that. Might be worth looking into. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining

Re: [SQL] SQL Query question

2005-06-30 Thread Peter Eisentraut
HERE > clause parameters - obviously! The condition (tbl2."StockID" = 1) will remove all rows that have null values in the tbl2 fields, thus making your left join useless. Perhaps you should change that to (tbl2."StockID" = 1 OR tbl2."StockID" IS NULL) -- or use your first version. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] bug in information_schema?

2005-08-01 Thread Peter Eisentraut
linking the same entities. That would have been my guess, but it seems that even if a column or table is used multiple times, a dependency is recorded only once, as it should be. It might have been related to the duplicate pg_user mention. -- Peter Eisentraut http://developer.postg

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
to enumerate all the letters instead of using a range specification. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail comman

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
Am Montag, 5. September 2005 17:10 schrieb A. Kretschmer: > > colname ~ '^[A-Za-z]*$' > > This match also a empty string. An empty string also fulfulls the condition "only with characters A-Za-z". Or maybe not. :-) -- Peter Eisentraut http://

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
alvherre=# select 'á' ~ '[[:alpha:]]'; > ?column? > -- > t > (1 fila) I don't think this addresses the concern I intended to raise. The first query should succeed for all letters between a and z, the second should succeed for all letters. Neither i

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
than 26 letters? Well, it seems that our regexp library interprets [a-z] as exactly 26 letters, but that seems to be a lack of locale support rather than a feature. There are statements in the documentation of other regexp libraries that directly contradict this behavior. --

Re: [SQL] a "catch all" type ... such a thing?

2005-09-10 Thread Peter Eisentraut
case, the UTF-8 encoding in PostgreSQL is probably your best choice, unless you want to dig into the weirdness that is MULE_INTERNAL. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have

Re: [SQL] What should this query match?

2005-09-14 Thread Peter Eisentraut
se a pattern matching operator, so I'd go back and check if your queries really are what you think they should be. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the plann

Re: [SQL] What should this query match?

2005-09-14 Thread Peter Eisentraut
nd one for LIKE. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] add column if doesn't exist

2005-09-26 Thread Peter Eisentraut
Brandon Metcalf wrote: > Is there a way to check for the existence of a column in a table > other than, say, doing a SELECT on that column name and checking the > output? SELECT * FROM information_schema.columns; Customize to taste. -- Peter Eisentraut http://developer.postgresql.or

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-20 Thread Peter Eisentraut
nd, no matter what the > command looks like. You can write a couple of rules for that. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Trigger / rule question

2005-11-20 Thread Peter Eisentraut
r or rule fails, does the insert, update or delete > statement (transaction) fail? Yes -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [SQL] Locale and pattern matching

2005-12-08 Thread Peter Eisentraut
s impossible to achieve. > Until now, I've been selecting LATIN1 encoding, but after a few > tests, I came to think that LATIN9 is a better option (the euro > sign...). For those who regularly use LATIN9, what is your opinion ? > Is it indeed a better option ? Yes. -- Peter Eise

Re: [SQL] filtering after join

2006-01-25 Thread Peter Eisentraut
=B.b; What makes you think that the filtering happens before the join here? And why would it matter? The results should be all the same. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you searc

Re: [SQL] filtering after join

2006-01-26 Thread Peter Eisentraut
andrew wrote: > Sorry for the confusion. This is what i meant. Thanks, Michael. > > select * > from (select * from A, B where A.a = B.b) as s > where foo(s) < 2; > > On 1/25/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > > andrew wrote: > > > I

Re: [SQL] filtering after join

2006-01-26 Thread Peter Eisentraut
the record type of A and B into one. Then the proposed solution is right. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an i

Re: [SQL] filtering after join

2006-01-26 Thread Peter Eisentraut
andrew wrote: > How will the query planner do for a nesting query? Treat the > subqueries as multiple queries and then link them together? > where can I find the information (codes or documents)? Look at the execution plan using the EXPLAIN command. -- Peter Eisent

Re: [SQL] Very slow updates when using IN syntax subselect

2006-02-11 Thread Peter Eisentraut
eeze, can't > postgres figure this out for itself? I'm sure you wouldn't appreciate it if PostgreSQL did a full table scan before each query to figure out the total size of the involved tables. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [SQL] Modifying postgresql.org file

2006-02-15 Thread Peter Eisentraut
Ken Hill wrote: > Can someone point me in a > direction as to where I can learn how to modify the postgresql.org > file to increase work_mem? RTFM -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)---

Re: [SQL] Feature, my misconception or bug??

2006-02-22 Thread Peter Eisentraut
1 > has no bits set to right of > 8 LSB ^ I'm sure you are aware that "1" is a set bit, so which part are you not understanding? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [SQL] Change date format through an environmental variable?

2006-03-02 Thread Peter Eisentraut
sed there, only by initdb. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's da

Re: [SQL] PostgreSQL Handling of Special Characters

2006-03-19 Thread Peter Eisentraut
Christian Paul B. Cosinas wrote: > My Database uses SQL_ASCII encoding. Do yourself a favor and use something else. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the plan

Re: [SQL] have you feel anything when you read this ?

2006-03-20 Thread Peter Eisentraut
gainst or for any brandname: not Mesql nor > postgres. > > just sed 's/MySQL/SomeDBMS/g' and concentrate on the fact: > that even so stupid DBMS handling NULs properly. :-) So printing a space is "properly"? Curious ... -- Peter Eisentraut http://developer.postgres

Re: [SQL] have you feel anything when you read this ?

2006-03-20 Thread Peter Eisentraut
ytes in unambigious form. Note that printing out a space will lose the null byte on restore, so that solution does not seem satisfactory. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forg

Re: [SQL] have you feel anything when you read this ?

2006-03-20 Thread Peter Eisentraut
Eugene E. wrote: > the bytea does not output NULs at all. > don't mock me. peter=# create table test (a bytea); CREATE TABLE peter=# insert into test values ('a\\000b'); INSERT 0 1 peter=# select * from test; a ---- a\000b -- Peter Eisentraut http://developer.p

Re: [SQL] have you feel anything when you read this ?

2006-03-20 Thread Peter Eisentraut
nary form you need to select it. Then you can pass the exact bytes back and forth. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] have you feel anything when you read this ?

2006-03-20 Thread Peter Eisentraut
Eugene E. wrote: > input. then what a difference bitween those types except strlen() ? bytea does not consider character set encodings and locales, and it handles null bytes. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadc

Re: [SQL] Bitfields always atomic? Other way to store attributes?

2006-03-27 Thread Peter Eisentraut
x27;)? Or > must I wrap things in > explicit transactions? Each of these commands will be its own transaction if you don't explicitly start one. > My application is to give attributes to an address table. But maybe > there is a better way? Create 5 bo

Re: [SQL] Postgres 8.1 sequences and 'CALL'-syntax

2006-05-08 Thread Peter Eisentraut
ey DON'T support > the postgres-specific "select nextval('seq_name')". Instead they gave > me the hint to use the sql-conform "call nexval('seq_name')". That statement is not any more SQL conforming than the other. -- Peter Eisentraut http://develo

Re: [SQL] Xml Schemas

2009-06-08 Thread Peter Eisentraut
On Saturday 06 June 2009 22:53:19 Isaac Dover wrote: > Hello, I am attempting to build an xml representation of any database, but > I'm having trouble doing so. I was interested in using the existing xml > functions, such as "schema_to_xmlschema", but the results are strange and > unusable. The res

Re: [SQL] Double aggregate problem

2009-07-22 Thread Peter Eisentraut
On Wednesday 22 July 2009 19:16:21 David Weilers wrote: > I have the following query: > > select v.id, array_to_string(array_accum(s.name),', ') as sector , > array_to_string(array_accum(p.name),', ') as provincie from tblvacature > v, tblaccount a , tblvacaturesector vs, tblsector s , > tblvacatur

Re: [SQL] Question about encoding

2009-08-24 Thread Peter Eisentraut
On mån, 2009-08-24 at 18:42 +0200, Denis BUCHER wrote: > Question 1 : > Is it the expected behavior ? These characters have a SQL_ASCII > equivalent because I already have them stored in another table of the > same database SQL_ASCII is not the same as ASCII. SQL_ASCII means, take the bytes as th

Re: [SQL] Pg_Restore with --clean option

2009-09-30 Thread Peter Eisentraut
On Wed, 2009-09-30 at 22:14 -0700, Jyoti Seth wrote: > I want to restore data of a single table. Before restoring the data I > disabled all the triggers and constraints on that table. I used the restore > command with --clean option so that data gets deleted from that table and > then fresh data ge

Re: [SQL] How oids of the base data types often change?

2010-07-19 Thread Peter Eisentraut
On mån, 2010-07-19 at 14:47 +0400, Dmitriy Igrishin wrote: > For example, when using libpq(-xx), it is possible to get the oid of > the type of any column. > Is there a guarantee that oids of base types (void, integer, ... ) > will not change in future > releases of Postgres? There is no actual "g

Re: [SQL] type cast

2010-08-10 Thread Peter Eisentraut
On tis, 2010-08-10 at 18:38 +0200, Imre Horvath wrote: > Hi! > > I don't know if it's the right place or the psycopg2 list: > > I've got a plpython function, with a character varying param. > I can call it from sql. > But when i try to call it with psycopg2.callproc('testfunc', ['test']), > i've

Re: [SQL] Using count on a join, group by required?

2010-08-11 Thread Peter Eisentraut
On tis, 2010-08-10 at 22:21 -0430, Jose Ildefonso Camargo Tolosa wrote: > And it works, it gives me something like: > > product_id | name | code | manufacturer_id | > manufacturer_name | num_serials > +--+---+--

Re: [SQL] How strings are sorted by LC_COLLATE specifically?

2010-11-30 Thread Peter Eisentraut
On tor, 2010-11-25 at 14:42 +0900, Chang Chao wrote: > How strings are sorted when LC_COLLATE = ja_JP.UTF-8. > I tried to read the documention on that,but there are just a few > words, > like LC_COLLATE determines string sort order, > Is there a specific reference about this? > So I can implement a

Re: [SQL] a strange order by behavior

2011-06-22 Thread Peter Eisentraut
On ons, 2011-06-22 at 01:43 -0700, Samuel Gendler wrote: > I seem to recall a thread here about it ignoring spaces entirely in that > collation (and maybe ignoring capitalization, too?). The way it works is that every collating element (letter or other character or character group that you sort as

Re: [SQL] a strange order by behavior

2011-06-22 Thread Peter Eisentraut
On ons, 2011-06-22 at 02:39 -0700, Samuel Gendler wrote: > Pavel suggested using a collation of ucs_basic, but I get an error > when I > try that on linux: > > $ createdb -U u1 --lc-collate=ucs_basic -E UTF-8 test > createdb: database creation failed: ERROR: invalid locale name ucs_basic ucs_ba

Re: [SQL] a strange order by behavior

2011-06-22 Thread Peter Eisentraut
On tor, 2011-06-23 at 05:57 +0200, Pavel Stehule wrote: > 2011/6/22 Peter Eisentraut : > > On ons, 2011-06-22 at 02:39 -0700, Samuel Gendler wrote: > >> Pavel suggested using a collation of ucs_basic, but I get an error > >> when I > >> try that on linux: >

Re: [SQL] the use of $$string$$

2011-11-07 Thread Peter Eisentraut
On mån, 2011-11-07 at 08:44 +, Richard Huxton wrote: > > myvarString = "long string that contains single quotes" > > cusor.execute("insert into table (pkid, myfield) values (%s, $$%s > $$)",(123, > > myvarString)) > > > > When I execute the above I'm seeing: > > E'long string that contains sing

Re: [SQL] order by different on mac vs linux

2012-05-31 Thread Peter Eisentraut
On lör, 2012-05-26 at 21:47 -0600, Wes James wrote: > on the ascii table here: > > http://www.ascii-code.com/ > > upper case letters should sort before lowercase letters. ASCII has nothing to do with how letters "should" be sorted. It is not a sorting standard, it is a character encoding standa

Re: [SQL] SQL92 compliance

2006-08-23 Thread Peter Eisentraut
s at least for 7.4. I don't think it works for newer versions, but it should give you an idea what is required to get it working. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you

Re: [SQL] SQL92 compliance

2006-08-23 Thread Peter Eisentraut
so there were porting troubles, but I don't remember the details. I'm just saying that it's doable if it's a necessity for someone. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In ve

Re: [SQL] SQL92 compliance

2006-08-23 Thread Peter Eisentraut
Scott Marlowe wrote: > Would it be possible if we required postfix operators and related to > be inside parens? > > select x ~~ y as yabba > OR > select (x ~~ y) yabba That's pretty much what you get if you restrict the expression to c_expr. -- Peter Eisentraut http://d

Re: [SQL] double precision vs. numeric

2006-08-24 Thread Peter Eisentraut
Aarni Ruuhimäki wrote: > ' ... type double precision ... will be depreciated / unsupported in > future releases ... ' That is completely false. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [SQL] Create View

2006-11-04 Thread Peter Eisentraut
ng > all of the fields if I add columns to the table (whatever). > > Is this an SQL thing or a PostGreSQL thing? SQL -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you se

Re: [SQL] Differentiate Between Zero-Length String and NULLColumn Values

2007-01-30 Thread Peter Eisentraut
ertainly allowed by PostgreSQL without any flags. It's just that the result is not what some people expect. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Case with Char(1)

2007-02-28 Thread Peter Eisentraut
Am Mittwoch, 28. Februar 2007 14:02 schrieb Ezequias Rodrigues da Rocha: > it is possible to use case with character (1) ? Have you tried it? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 7: You

Re: [SQL] GiST index question: performance

2007-03-06 Thread Peter Eisentraut
n bring up > Q3C since it's less widely deployed. How do you manage to get your own code installed under that theory? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 7: You can help support the Pos

Re: [SQL] select vs. select count

2007-03-27 Thread Peter Eisentraut
Claus Guttesen wrote: > Why does select and select(count) produce two different results? count(expression) only counts nonnull values. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: Don't

Re: [SQL] Foreign Unique Constraint

2007-03-27 Thread Peter Eisentraut
e the access simpler. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Foreign Unique Constraint

2007-03-28 Thread Peter Eisentraut
llowed in check constraints. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Calling void functions

2007-04-02 Thread Peter Eisentraut
REATE FUNCTION foo (a int) RETURNS void LANGUAGE sql AS $$ SELECT foo($1, default-value); $$; -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you searched our list arc

Re: [SQL] LOCK command inside a TRANSACTION

2007-04-03 Thread Peter Eisentraut
OR UPDATE. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] CPU statistics

2007-04-04 Thread Peter Eisentraut
Am Mittwoch, 4. April 2007 14:36 schrieb [EMAIL PROTECTED]: > It is possible to retrieve information about the server hardware via > postgreSQL ? You'd have to write your own function. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end o

Re: [SQL] Potential bug in postgres 8.2.4

2007-05-24 Thread Peter Eisentraut
of this is strictly speaking incorrect anyway. And the queries that do work will most likely start not working in a future version. All of this is a gradual effort to reduce excessive automatic type casting. I suggest you fix your application. -- Peter Eisentraut http://developer.postgresql

[SQL] Database system identifier from SQL

2007-07-10 Thread Peter Eisentraut
Is there a way to query the database system identifier that pg_controldata outputs from SQL? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http

Re: [SQL] Database system identifier from SQL

2007-07-10 Thread Peter Eisentraut
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Is there a way to query the database system identifier that > > pg_controldata outputs from SQL? > > Don't think so. Do you have a use-case for providing a function to > return that? I'd

Re: [SQL] SUPERUSER vs CREATEUSER causes foul 'code smell'

2007-08-16 Thread Peter Eisentraut
her roles, but not have other > SUPERUSER priveleges - how can I do that? See CREATEROLE privilege. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore yo

Re: [SQL] Loading 8.2 data into 8.1

2007-11-22 Thread Peter Eisentraut
Am Dienstag, 20. November 2007 schrieb Andreas Joseph Krogh: > Is it considered "safe" to use 8.1's pg_dump to dump an 8.2-db and load it > into 8.1? No, pg_dump will complain if you try that. It could work, with manual fixups perhaps, but it is far from "safe&qu

Re: [SQL] table column names - search

2008-01-14 Thread Peter Eisentraut
ion_schema.columns WHERE column_name LIKE '%name%'; Add DISTINCT and other columns to taste. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-17 Thread Peter Eisentraut
can be made to present the same SQL-level API as we have for > OSSP. Otherwise we'll be faced with boatloads of platform-dependent > client code ... Indeed. Linux, for example, also has "its own" UUID generator, but I intentionally used the OSSP library, because it is platfo

Re: [SQL] PostgreSQL does not support updateable cursors

2008-02-17 Thread Peter Eisentraut
ForwardOnly, adLockReadOnly' then it work fine. However, > I need to use this query for make data ready to be updated on some record. >      How can I fix this problem? 8.3 supports updatable cursors. Try that. -- Peter Eisentraut http://developer.postgresql.org/~petere/ --

Re: [SQL] Backward compatibility psql 8.1 to 8.2

2008-02-17 Thread Peter Eisentraut
upport that setup. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] query results in XML format?

2008-03-06 Thread Peter Eisentraut
Emi Lu wrote: > Can someone suggestion some tutorial/hyperlinks/docs about how > postgresql output query results into xml files? http://www.postgresql.org/docs/8.3/static/functions-xml.html#FUNCTIONS-XML-MAPPING -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] nesting XmlAgg

2008-07-03 Thread Peter Eisentraut
Am Donnerstag, 3. Juli 2008 schrieb Isaac Dover: > select >   XmlElement(name "Catalog", >     XmlElement(name "Tables", >       XmlAgg(XmlElement(name "Table", XmlAttributes(T.table_name as > "Name"), XmlElement(name "Columns", > -- i was attempting to aggregate here as well >         (select XmlE

Re: [SQL] uuid-ossp contrib in pg 8.1

2008-08-28 Thread Peter Eisentraut
James Neethling wrote: I want to add uuid support to a postgres 8.1 installation. Can I install 8.3 uuid-contrib into 8.1? 8.1 does not have a uuid type, so this won't work. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [SQL] DIfference between max() and greatest() ?

2008-09-12 Thread Peter Eisentraut
Ruben Gouveia wrote: What is the difference between these two. I know that max() is an aggregate function ... and greatest() is a normal single-row function. One works vertically, one works horizontally, if that helps you. :-) Or max() is like sum() and greatest is like +. -- Sent via pgsql

Re: [SQL] Performing intersection without intersect operator

2008-10-28 Thread Peter Eisentraut
Nacef LABIDI wrote: I want to perform an intersection between several select queries but without using the INTERSECT keyword. select userid from orders where productid=1 INTERSECT select userid from orders where productid=2 I want to transform it without the INTERSECT. (select userid from

Re: [SQL] Display message to user

2008-11-05 Thread Peter Eisentraut
Bart van Houdt wrote: Oracle has a nice package procedure (dbms_output.put_line) to display a message in SQL*Plus, which can display a message to the user. I use this a lot, to notify users of the progress being made during the execution of a script. Is there a way to do this with Postgres as

Re: [SQL] Create index on xml field

2009-01-13 Thread Peter Eisentraut
On Tuesday 13 January 2009 18:56:33 Brad Balmer wrote: > Why would the following not work? > create index tstTbl_idx on test_tbl (cast(xpath ('//uim:upcCode/text()', > job) as text[])); Looks like you are missing a namespace definition. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.or

Re: [SQL] select count of all overlapping geometries and return 0 if none.

2009-03-13 Thread Peter Eisentraut
On Thursday 12 March 2009 19:28:19 Duffer Do wrote: > I want to return the following: > locations    |  number_visits > Frankfurt    |  6 > Manhattan  |  3 > Talahassee |  0 > > My query only returns: > Frankfurt    |  6 > Manhattan  | 3 > My query: > SELECT count(user_name) as number_visits, loca

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-08 Thread Peter Eisentraut
On Wednesday 08 April 2009 20:08:55 Mario Splivalo wrote: > What are your practices, when do you use ENUMs and when Domains? When given the choice, pretty much ENUMs. Domains weren't really conceived for this sort of thing in the first place, so it's good to move away from them. -- Sent via p

Re: [SQL] A Question

2000-05-26 Thread Peter Eisentraut
-10-23'; > Also tell me how to retreive all records from database where field which is > date time is null I am working on ASP and backend as ms-ACCESS SELECT * FROM table WHERE datetime_field is null; -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED]

Re: [SQL] aliases break my query

2000-05-26 Thread Peter Eisentraut
n SELECT are a good idea. We invariably get a question like this every week and invariably the answer is "if you give a table an alias you *must* refer to it by that alias". (I'm sure Tom has this reply automated by now.) I claim the only thing that buys is confusion for very little conv

Re: [SQL] Inheritance

2000-05-30 Thread Peter Eisentraut
ot;a", period. I know this doesn't help in practice, though. -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED] 75262 Uppsala http://yi.org/peter-e/Sweden

[SQL] Re: [ADMIN] create view security

2000-05-31 Thread Peter Eisentraut
Wallingford, Ted writes: > I am using 6.3 in this case. I'm sorry but that is pre-historic era around here and no one really remembers what the problems might have been back then (other than that they were surely plenty). Upgrading might be your best bet on all fronts. -- Peter Ei

Re: [SQL] SQL'92 web resources

2000-06-02 Thread Peter Eisentraut
Bruce Momjian writes: > Shouldn't we have links to these on our web site? SQL92 is yesterday's news. Find your SQL99 documents at: ftp://jerry.ece.umassd.edu/isowg3/x3h2/Standards/ (Though I'm unsure about the legality of these.) -- Peter Eisentraut Ser

Re: [SQL] LIKE vrs ~~

2000-06-03 Thread Peter Eisentraut
difference at all. (Only the extra cycles to convert LIKE to ~~ internally.) If you're comparing true case-insensitive matching to using UPPER, then the latter is probably faster but doesn't really do the same thing. -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROT

Re: [SQL] Client Logging

2000-06-12 Thread Peter Eisentraut
ion that takes a string argument and calls elog. is probably reasonable. -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED] 75262 Uppsala http://yi.org/peter-e/Sweden

[SQL] Re: [BUGS] Some problem with inet type on PostgreSQL-7.0

2000-06-17 Thread Peter Eisentraut
> switch01.tor | 1 | 127.0.0.2 | 255.0.0.0 > switch01.tor | 2 | 127.0.0.3 | 255.0.0.0 > switch01.tor | 3 | 209.250.155.8 | 255.255.255.224 > (2 rows) > > > 127.0.0.2 | 255.0.0.0 and 127.0.0.3 | 255.0.0.0 - it's

Re: [SQL] find the number of rows for each table

2000-06-18 Thread Peter Eisentraut
t (medias.media_id)), count(distinct > (contacts.contact_id)) from medias, contacts WHERE medias.media_id = > contacts.media_id AND medias_categories.media_id = medias.media_id AND > medias_categories.categorie_id = 1 > - > ERROR: parser:

Re: [SQL] Database Transfer

2000-06-18 Thread Peter Eisentraut
Craig May writes: > I have two servers running pgsql. Is there a command to transfer the > databases > between them? pg_dump and psql. "Back up" one database and "restore" it on the other server. Don't even think about moving files around. :) -- Peter Eise

Re: [SQL] Altnerate Column Return Names

2000-07-07 Thread Peter Eisentraut
esult to return > > table1.id | table1.name | table1.data | table2.id | ,,, > ---+-+-+---+- ... select table1.id as "whatever you want", table1.name as "whatever you want", table1.data as "something", ... You get the idea.

Re: [SQL] Search for underscore w/ LIKE

2000-07-07 Thread Peter Eisentraut
s are not special. Maybe we could offer that as well. blah ~ r'.+\..+' -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED] 75262 Uppsala http://yi.org/peter-e/Sweden

Re: [SQL] Select by priority

2000-07-16 Thread Peter Eisentraut
me person table, but remember that you need to group by every non-aggregate column in the select list. -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED] 75262 Uppsala http://yi.org/peter-e/Sweden

Re: [SQL] Database authentication and configuration

2000-07-18 Thread Peter Eisentraut
red. > In addition, I'd like to default various database settings when I > connect to the database. Where is the place to do such configuration? That depends on the nature of the various settings. You can put commands into ~/.psqlrc that will be executed when psq

Re: [SQL] What's ETA for read/write Views?

2000-08-04 Thread Peter Eisentraut
chine going to > figure out what you want an update on the view to do? The SQL standard has pretty precise rules for when views are updatable and how. -- Peter Eisentraut Sernanders väg 10:115 [EMAIL PROTECTED] 75262 Uppsala http://yi.org/peter-e/Sweden

<    1   2   3