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 standard.

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 single quotes' in

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_basic

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 an

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] 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 got the

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

Re: [SQL] Pg_Restore with --clean option

2009-10-01 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 get

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

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

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, location_name

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.org)

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

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] 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

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:

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 XmlElement(name

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] Usage of UUID with 8.3 (Windows)

2008-02-17 Thread Peter Eisentraut
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 platform independent. -- Peter Eisentraut http://developer.postgresql.org/~petere

Re: [SQL] PostgreSQL does not support updateable cursors

2008-02-17 Thread Peter Eisentraut
' 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/ ---(end of broadcast

Re: [SQL] Backward compatibility psql 8.1 to 8.2

2008-02-17 Thread Peter Eisentraut
Scott Marlowe wrote: Does anyone who know about packaging know if this a limitation of the packaging spec in rpm, or is there a relatively simple way to get an rpm based machine to run 1 ver of pgsql at a time? The difference is merely that the packaging doesn't support that setup. -- Peter

Re: [SQL] table column names - search

2008-01-14 Thread Peter Eisentraut
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] 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. -- Peter Eisentraut http

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

2007-08-16 Thread Peter Eisentraut
, 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 your desire

[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 like to find out whether two connections are really

Re: [SQL] Potential bug in postgres 8.2.4

2007-05-24 Thread Peter Eisentraut
. 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.org/~petere/ ---(end of broadcast

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 of broadcast

Re: [SQL] LOCK command inside a TRANSACTION

2007-04-03 Thread Peter Eisentraut
. -- 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

[SQL] Calling void functions

2007-04-02 Thread Peter Eisentraut
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 archives

Re: [SQL] Foreign Unique Constraint

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

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 'kill -9

Re: [SQL] Foreign Unique Constraint

2007-03-27 Thread Peter Eisentraut
. -- 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] GiST index question: performance

2007-03-06 Thread Peter Eisentraut
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 PostgreSQL project by donating

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 can help

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

2007-01-30 Thread Peter Eisentraut
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] Create View

2006-11-04 Thread Peter Eisentraut
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 searched our list archives? http

Re: [SQL] SQL92 compliance

2006-08-23 Thread Peter Eisentraut
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 searched our list archives

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

2006-05-08 Thread Peter Eisentraut
-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://developer.postgresql.org/~petere/ ---(end of broadcast

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

2006-03-27 Thread Peter Eisentraut
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 boolean fields. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end

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

2006-03-20 Thread Peter Eisentraut
/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.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget

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

2006-03-20 Thread Peter Eisentraut
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 forget to increase your free

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.postgresql.org/~petere

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

2006-03-20 Thread Peter Eisentraut
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 broadcast

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 planner

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

2006-03-02 Thread Peter Eisentraut
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 datatypes do

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

2006-02-22 Thread Peter Eisentraut
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)--- TIP 1: if posting/reading through Usenet, please send

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)--- TIP 1

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

2006-02-11 Thread Peter Eisentraut
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/ ---(end of broadcast)--- TIP 4: Have

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 want to use a UDF to filter tuples t that are generated after

Re: [SQL] filtering after join

2006-01-26 Thread Peter Eisentraut
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 index scan if your

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 Eisentraut http

Re: [SQL] filtering after join

2006-01-25 Thread Peter Eisentraut
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 searched our list archives

Re: [SQL] Locale and pattern matching

2005-12-08 Thread Peter Eisentraut
, 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 Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast

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

2005-11-20 Thread Peter Eisentraut
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
, 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 subscribe-nomail command to [EMAIL

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.org/~petere

Re: [SQL] What should this query match?

2005-09-14 Thread Peter Eisentraut
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] a catch all type ... such a thing?

2005-09-10 Thread Peter Eisentraut
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 you checked our extensive FAQ

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
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 command to [EMAIL PROTECTED

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
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 is guaranteed to succeed only for all normal Latin letters a, b, c, ... z. -- Peter Eisentraut http

Re: [SQL] POSIX Regular Expression question

2005-09-05 Thread Peter Eisentraut
, 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. -- Peter Eisentraut http

Re: [SQL] bug in information_schema?

2005-08-01 Thread Peter Eisentraut
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.postgresql.org/~petere

Re: [SQL] ENUM like data type

2005-06-30 Thread Peter Eisentraut
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 column's datatypes do

Re: [SQL] SQL Query question

2005-06-30 Thread Peter Eisentraut
. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] encoding

2005-05-07 Thread Peter Eisentraut
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] 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 of broadcast

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

2005-02-18 Thread Peter Eisentraut
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] case sensitive/insensitive confusion

2005-02-01 Thread Peter Eisentraut
the documentation there. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] HowTo change encoding type....

2004-11-25 Thread Peter Eisentraut
Andrew M wrote: how do I change the encoding type in postgreSQL (8) from UTF-8 to ISO-8859-1? Dump your database, drop your database, recreate your database with the different encoding, reload your data. Make sure the client encoding is set correctly during all this. -- Peter Eisentraut

Re: [SQL] Table definition

2004-11-16 Thread Peter Eisentraut
Am Dienstag, 16. November 2004 15:04 schrieb Bruno Prévost: Anybody know how to obtain the table definition in text. Use pg_dump. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 6: Have you searched our

Re: [SQL] Table definition

2004-11-16 Thread Peter Eisentraut
Am Dienstag, 16. November 2004 16:40 schrieb Bruno Prévost: I need to use it in sql. There is no direct way to do this in SQL, but I can offer you the following alternative: CREATE FUNCTION get_table_definition(text) RETURNS text AS ' #!/bin/sh pg_dump -t $1 ' LANGUAGE plsh; :) -- Peter

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Peter Eisentraut
Achilleus Mantzios wrote: Wouldn't make more sense to allow nested begin/commit/rollback blocks? Possibly. But that consideration would have been more relevant about 6 years ago when they wrote the SAVEPOINT syntax into the SQL standard. :) -- Peter Eisentraut http

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Peter Eisentraut
the isolation criterion of transactions and therefore needs additional facilities to behave tolerably. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] Information about the command SQL create synonym.

2004-10-12 Thread Peter Eisentraut
[EMAIL PROTECTED] wrote: Could you say if this command will be implemanted in a future version of a postgres database ? I'm not currently aware of any concrete proposals to implement this feature, but previous discussion has not shown any strong resistance against the concept. -- Peter

Re: [SQL] How to check postgres running or not ?

2004-09-20 Thread Peter Eisentraut
: stats buffer process postgres 1178 1177 0 1826 2048 0 09:14 ?00:00:00 postgres: stats collector process postgres 9935 1172 0 4443 2848 0 13:46 ?00:00:00 postgres: pei template1 [local] idle -- Peter Eisentraut http://developer.postgresql.org/~petere

Re: [SQL] any chance SQL ASSERTIONS will be implemented?

2004-08-16 Thread Peter Eisentraut
, but there is no telling when it will happen. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] Inserts with incomplete rows... NOT NULL constraints

2004-08-11 Thread Peter Eisentraut
is inserted, which in turn is null if you didn't specify one. You might find it odd that default values that are inconsistent with constraints are allowed, but I don't see any reasonable alternative. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end

Re: [SQL] LIKE on index not working

2004-07-22 Thread Peter Eisentraut
of index, as explained here: http://www.postgresql.org/docs/7.4/static/indexes-opclass.html -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] [JDBC] [ADMIN] Migrate postgres databases from SQL_ASCII to UNICODE

2004-07-18 Thread Peter Eisentraut
. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

Re: [SQL] BYTEA output presentation

2004-07-16 Thread Peter Eisentraut
tool or script which can output the hexadecimal or octal format for PostgreSQL's BYTEA datatype ? Your help is appreciated. Thank you. libpq has functions to deal with bytea data: http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA -- Peter Eisentraut http

Re: [SQL] Custom type where not all elements are comparable

2004-07-05 Thread Peter Eisentraut
Markus Bertheau wrote: Is it possible to define or implement a type in PostgreSQL not all values of which are comparable to each other? In particular I'm thinking of a duration type similar to the XML Schema duration type[1]. For example P2D (2 days) is less than P4D (4 days), but P1M (1

Re: FW: [SQL] = operator vs. IS

2004-06-29 Thread Peter Eisentraut
Rich Hall wrote: My question is why is the form (anything) = NULL allowed? Since (anything) = NULL is always Null, this cannot be what the coder intended. Using that same line of argument, why is 1+1 allowed? The coder clearly knows that it is 2, so why is he writing that? Many

Re: [SQL] In 7.4 ensure you have DEFAULT now () with no spaces

2004-06-19 Thread Peter Eisentraut
David B wrote: We had been testing 7.4 for a few days and just noticed that some tables had created_timestamp rows with a date/time of the date the DB was created...not the date/time the insert was done. Looking at those tables the create DDL's for those few tables contained now () as in:

Re: [SQL] Getting FK relationships from information_schema

2004-06-09 Thread Peter Eisentraut
Tom Lane wrote: Kyle [EMAIL PROTECTED] writes: I think this is only an issue when the user relies on postgres to choose a constraint name automatically. Seems like a reasonable approach would be to have postgres choose a name for the constraint that happens to be unique in the schema

Re: [SQL] SELECT - ORDER BY Croatian characters ....

2004-05-07 Thread Peter Eisentraut
Kornelije wrote: I'm using PostgreSQL and my database contains Croatian Characters (ccz...) so when I pose a query, and I use order by clause, the result is not sorted properly. You need to initdb your database with the proper locale (hr_HR, probably). Also, choose the right encoding

Re: [SPAM] Re: [SQL] Permissions not working

2004-05-03 Thread Peter Eisentraut
Pallav Kalva wrote: I tried both database privileges and table privileges (all and select) it still doesnt work. Not sure what is wrong here, I tried logging in as both postgres and usps user and both them doesnt work. What about all those groups that have privileges? Please post the

Re: [SQL] start

2004-05-03 Thread Peter Eisentraut
H.J. Sanders wrote: I have difficulties starting the postmaster automatically at boot time (everything I tried is done by 'root'). Can someone give me an example for LINUX (SUSE 8). Maybe you would rather want to download the binary packages, which take care of that. RPMs for SuSE are

Re: [SQL] Permissions not working

2004-05-01 Thread Peter Eisentraut
Pallav Kalva wrote: Also here is the privileges information from information_schema tables. Is there a way to REVOKE these privileges ? You need to log in as the user that has granted the privilege you want to revoke. In this case, log in as postgres and do REVOKE ALL FROM PUBLIC;.

Re: [SQL] Server Side C programming Environment Set up

2004-04-23 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 18:07 schrieb Tom Lane: I agree with the suggestion elsewhere in the thread about generalizing the contrib Makefile framework to the point that it could be installed as part of the -devel RPM, and then used to build user-written backend functions. It seems to me

Re: [SQL] Record Lock details

2004-04-23 Thread Peter Eisentraut
Am Freitag, 23. April 2004 10:43 schrieb Denis P Gohel: Is there a data dictionary in Postgres from where i can get the info about locked rows of any table ? If possible the value of those locked record ? No, this information is not available for end users. I have an ODBC application working

Re: [SQL] Server Side C programming Environment Set up

2004-04-22 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 15:58 schrieb Rod Taylor: make install-all-headers It's explained in the installation instructions. That doesn't happen on most platforms in the standard package. It certainly happens in all the packages that have ever come by me (maybe after a little

Re: [SQL] Server Side C programming Environment Set up

2004-04-22 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 07:59 schrieb Tom Lane: Peter Eisentraut [EMAIL PROTECTED] writes: make install-all-headers That's not a complete solution though; the headers are only half the problem. Makefiles are the other half, and our story on them is pretty bad. For instance I've been

Re: [SQL] Server Side C programming Environment Set up

2004-04-21 Thread Peter Eisentraut
Kemin Zhou wrote: IN chapter 33 Extending SQL 33.7.5 Writing Code when run pg_config --includedir-server I got /usr/local/pgsql/include/server but my machine does have this directory make install-all-headers It's explained in the installation instructions. ---(end

Re: [SQL] [pgsql-advocacy] SQL Spec Compliance Questions

2004-04-03 Thread Peter Eisentraut
Josh Berkus wrote: 4.16.2 Referenceable tables, subtables, and supertables A table BT whose row type is derived from a structured type ST is called a typed table. Only a base table or a view can be a typed table. A typed table has columns corresponding, in name and declared type,

Re: [SQL] Problems with postgresql 7.4.1 configuration - URGENT

2004-01-13 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: this all started because I wanted to install pltclu so that I could gain access to pgmail using tcl. I have re-run the build and even though I have specified --with-tcl as one of the components of the build, tcl is not installed in the /lib directory.

Re: [SQL] Configure issues

2004-01-13 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: I am in the process of re-building postgresql 7.4.1, and on running configure I get the following output, of interest to me is the error message about ant even though it is installed in /library/ant, so i don't know why it is complaining. Any ideas?

Re: [SQL] Triggers

2004-01-12 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: does postgresql support the ability to email as in SQL Server? I want to create a trigger which on input of a record will send out an email. Is this possible? Write a trigger function in, say, PL/PerlU or PL/sh and have it send the email with the

  1   2   3   >