Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Bruce Momjian
nately (?) I'm a pretty heavy Vim user, so etags > is not in my scope. Uh, I think Vim can use etags, no? Isn't etags Exuberant Ctags? The Exuberant Ctags's FAQ mentions Vim: http://ctags.sourceforge.net/faq.html#11 -- Bruce Momjian http://momjian.us E

Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Bruce Momjian
On Thu, Jul 4, 2013 at 02:00:24AM +0530, Dev Kumkar wrote: > On Thu, Jul 4, 2013 at 1:36 AM, Bruce Momjian wrote: > > And let's not forget that column aliases can be used as indentifiers in > queries: > > test=> SELECT 1 AS x >

Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Bruce Momjian
--- 1 (1 row) test=> SELECT 1 AS "X" ORDER BY x; ERROR: column "x" does not exist LINE 2: ORDER BY x; Changing this would mean that the same identifier would have different case-folding rules depending on where it a

Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Bruce Momjian
se is hard to read.) > > If this is a deal-breaker for you, then I'm sorry, but you need to find > another database. Postgres settled on this behavior fifteen years ago, > and we're not changing it now. Agreed. I guess we could add it to the "Features We Do No

Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Bruce Momjian
On Wed, Jul 3, 2013 at 09:02:20PM +0530, Dev Kumkar wrote: > On Wed, Jul 3, 2013 at 8:54 PM, Bruce Momjian wrote: > > Agreed. The original poster specifically wanted "MYTABLE" and mytable > to be the same, not "mytable" and mytable. Postgres is cert

Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Bruce Momjian
ard requires folding to uppercase. Agreed. The original poster specifically wanted "MYTABLE" and mytable to be the same, not "mytable" and mytable. Postgres is certainly non-standard in this area. I think the ability visiually distinguish lower-case letters better than upp

Re: [SQL] to_char() accepting invalid dates?

2011-07-19 Thread Bruce Momjian
Thomas Kellerer wrote: > Bruce Momjian, 19.07.2011 00:02: > >>>> postgres=> select to_date('20110231', 'mmdd'); > >>>> > >>>> to_date > >>>> > >>>> 2011-

Re: [SQL] to_char() accepting invalid dates?

2011-07-18 Thread Bruce Momjian
, this was more a question regarding _why_ to_char() > behaves this way. Well, to_char() is based on Oracle's to_char(). How does Oracle handle such a date? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com

Re: [SQL] using min|max in where

2010-08-25 Thread Bruce Momjian
tial_rate > WHERE m_code = NEW.code AND date = (SELECT min(date) FROM interest_rate > WHERE m_code = NEW.code); > > This is just an example but I seem to find this pattern a lot in my > functions. I think you want the HAVING clause of SELECT. -- Bruce Momjian

Re: [SQL] oracle to postgres migration question

2010-06-15 Thread Bruce Momjian
and switches and knobs I > had to mess with to get useful output. Yeah, I have heard that description many times in other forms. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + --

Re: [SQL] oracle to postgres migration question

2010-06-15 Thread Bruce Momjian
Joshua Gooding wrote: > Hello, > > I'm looking for the postgres equivalent of oracles: set numwidth > command. Is there an equivalent? If we knew what it did, we might be able to help you. -- Bruce Momjian http://momjian.us EnterpriseDB

Re: [SQL] Capacity planning.

2010-03-31 Thread Bruce Momjian
ch. No idea. You should be using connection pooling for that setup. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postg

Re: [DOCS] [SQL] proposal for a CookBook in postgresql.org

2009-06-02 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian escribi?: > > Alvaro Herrera wrote: > > > > I don't know about Roberto Mello's site. Did we get a copyright > > > transfer or a license saying we could use the contents? > > > > Nope, but I assumed it was

Re: [SQL] proposal for a CookBook in postgresql.org

2009-06-02 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian escribi?: > > > FYI, I have a copy of the old plpgsql cookbook at: > > > > http://www.brasileiro.net:8080/postgres/cookbook/ > > PostgreSQL CookBook Pages > > Roberto Mello > > >

Re: [SQL] proposal for a CookBook in postgresql.org

2009-06-02 Thread Bruce Momjian
80/postgres/cookbook/ PostgreSQL CookBook Pages Roberto Mello http://techdocs.postgresql.org/guides/SetReturningFunctions PostgreSQL 7.3 Set Returning Functions Stephan Szabo stored at: http://momjian.us/expire/cookbook.tgz if someone wants

Re: [SQL] Grass Root Protectionism

2009-02-08 Thread Bruce Momjian
benefitting more from the relationship, not non-US people. This is true of many open source projects. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via

Re: [SQL] array_to_string(anyarray, text) that was working in 8.1 is not working in 8.3

2009-01-21 Thread Bruce Momjian
st > > as of CVS HEAD, it seems safe to relax this back to the way it was > > pre-8.3. > > > > I'm still worried about the possibility of extension functions or future > > core functions failing to follow this coding rule; but as long

Re: [SQL] inconsistent automatic casting between psql and function

2008-12-10 Thread Bruce Momjian
like the cast of a float to an integer: test=> select 1.23432::integer; int4 -- 1 (1 row) -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://enterprisedb.com + If

Re: [SQL] Public synonyms

2008-12-06 Thread Bruce Momjian
Azzeddine Daddah wrote: > Hi guys, > I'm new to Postgresql and I've a small question: > Does Postgresql support public synonyms? No, sorry, but it is a TODO item: Add support for public SYNONYMs -- Bruce Momjian <[EMAIL PROTECTED]>http://

Re: [SQL] Re: Efficiently determining the number of bits set in the contents of, a VARBIT field

2008-08-12 Thread Bruce Momjian
> When I had to do that, in days with smaller amounts of RAM, but very long > bit-vectors, I used a faster function sort-of like this: > > static char table[256] = { > 0,1,1,2,1,2,2,3,1,. > }; > > Then like above, but instead of the loop, > > n+= table[aval]; >

Re: [SQL] Extremely Low performance with ODBC

2008-05-28 Thread Bruce Momjian
Sebastian Rychter wrote: > Thanks. Hiroshi sent me a possible solution (which might be useful for > others going through similar situations), which is to toggle off the > "Disable Genetic Optimizer" from the ODBC driver configuration. Uh, why is ODBC modifyingin the 'geqo

Re: [SQL] Bouncing replies [was: SQL standards in Mysql]

2008-03-02 Thread Bruce Momjian
to my list address MUST be sent via the mailing list. > All other mail to my list address will bounce. Let me add that just trashing all email from you is an option many might choose. You seem more concerned with making things easy for yourself and not adequately considering the thousan

Re: [SQL] trigger for TRUNCATE?

2008-01-11 Thread Bruce Momjian
main gap in all of this is the lack of a TRUNCATE trigger, > probably also the lack of a specific TRUNCATE privilege as well. > > -- > Simon Riggs > 2ndQuadrant http://www.2ndQuadrant.com > > > ---(end of broadcast)--- > TIP 9: In versio

Re: [SQL] Cheers for DISTINCT ON

2008-01-07 Thread Bruce Momjian
same reaction to SQL. I think EQUEL and SQL both have strengths, but I think SQL subqueries and the cleaner handling of group aggregates makes SQL more useful in a variety of ways. -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB

Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-27 Thread Bruce Momjian
specified by LIMIT. This is because LIMIT is applied first. The command selects the specified number of rows, but might then block trying to obtain lock on one or more of them. Once the SELECT unblocks, the row might have been deleted or updated so that it does not meet the

Re: [SQL] Block size with pg_dump?

2007-08-27 Thread Bruce Momjian
ream, > > meaning there is no blocking in pg_dumps output itself. > > > Is that true for both input and output (i.e., pg_restore and pg_dump)? > I.e., can I use dd to write 65536-byte blocks to tape, and then do nothing > on running pg_restore? I.e., that pg_restore will accept any

Re: [SQL] Block size with pg_dump?

2007-08-26 Thread Bruce Momjian
, will the rest of each block get > > skipped? I.e., do I have to use dd on the way back too? And if so, > > what > > should the blocksize be? > > Postgres (by default) uses 8K blocks. That is true of the internal storage, but not of pg_dump's output because

Re: [SQL] Block size with pg_dump?

2007-08-26 Thread Bruce Momjian
_dump care what blocksize it gets? If so, what is it? I assume you could pipe pg_dump into dd and specify the block size in dd. -- Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a ha

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2007-04-02 Thread Bruce Momjian
change very clear to users. > > On Tue, Feb 20, 2007 at 08:07:11PM -0500, Bruce Momjian wrote: > > > > One problem with removing justify_hours() is that this is going to > > return '24:00:00', rather than '1 day: > > > > test=> se

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2007-03-26 Thread Bruce Momjian
ree with Tom that this should be changed; I'm just arguing that we > might well need a backwards-compatibility solution for a while. At the > very least we'd need to make this change very clear to users. > > On Tue, Feb 20, 2007 at 08:07:11PM -0500, Bruce Momjian wrote: >

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2007-02-20 Thread Bruce Momjian
ons out there that are relying on that > being nicely formated for display purposes. > > I agree it should be removed, but we might need a form of backwards > compatibility for a version or two... > -- > Jim Nasby[EMAIL PROTECTED] > EnterpriseDB http://enterprisedb.com

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-20 Thread Bruce Momjian
;> > the second row of the subarray schedule[1:1][1:2]. > > >> > So these two are foundamentally different things. > > >> > In my 7.4 even if you gave > > >> > SELECT schedule[1:1][888] FROM sal_emp WHERE name = 'Bill'; > >

Re: [SQL] Odd PL/PgSQL Error -- relation "X" does not exist when using index expression

2007-02-17 Thread Bruce Momjian
mand counter > and computes a new snapshot before executing each command in the > string." > > Should that documentation be modified? Done, and attached. -- Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://ww

Re: [SQL] domains and serial

2006-12-29 Thread Bruce Momjian
ach new domain reference create a new sequence and default string, but then you just have the bigserial behavior in a domain, which doesn't seem worth it. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] [SQL] Case Preservation disregarding case

2006-12-03 Thread Bruce Momjian
f the original creation and displaying that does work, but then it isn't clear if the identifier needs quotes (is the upper-case real or just for display). This gets us into even more confusion. Can someone can think of an answer to all this? -- Bruce Momjian [EMAIL PROTECTED] En

Re: [SQL] Case Preservation disregarding case sensitivity?

2006-11-14 Thread Bruce Momjian
we have, and because all-upper-case is hard to read. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you se

Re: [SQL] Migrating a Database to a new tablespace

2006-04-26 Thread Bruce Momjian
patch at one point --- not sure what the status is. > I have work someone did in the past. I just need to be updated to deal with tablespaces. ftp://candle.pha.pa.us/pub/postgresql/mypatches/checkfile.* Let me know if you want details. -- Bruce Momjian http://candle.pha.pa.us

Re: [SQL] Porting application with rules and triggers from PG 7.4.x

2006-04-21 Thread Bruce Momjian
ally foresee it going away any time soon. Do we need to update the manual? -- Bruce Momjian http://candle.pha.pa.us EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)---

Re: [SQL] Lead and tail quotes with \pset fieldsep

2006-03-19 Thread Bruce Momjian
restrictions well so it is > not an option. Just do: CREATE TEMP TABLE x AS SELECT * FROM view; COPY ... x Sorry that is the only way to dump CVS properly. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] how to make infinite intervals?

2006-03-03 Thread Bruce Momjian
t do the trick. :) On the TODO list: o Allow infinite dates and intervals just like infinite timestamps -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. + -

Re: [HACKERS] [SQL] Interval subtracting

2006-03-01 Thread Bruce Momjian
Hannu Krosing wrote: > ?hel kenal p?eval, K, 2006-03-01 kell 15:18, kirjutas Bruce Momjian: > > Stephan Szabo wrote: > > > > justify_days doesn't currently do anything with this result --- it > > > > thinks its charter is only to reduce day components that ar

Re: [HACKERS] [SQL] Interval subtracting

2006-03-01 Thread Bruce Momjian
Scott Marlowe wrote: > On Wed, 2006-03-01 at 14:18, Bruce Momjian wrote: > > Stephan Szabo wrote: > > > > justify_days doesn't currently do anything with this result --- it > > > > thinks its charter is only to reduce day components that are >= 30 days. &

Re: [SQL] Interval subtracting

2006-03-01 Thread Bruce Momjian
the later. It is best to have a single sign, and I think it is possible in all cases: '2 mons -1 days' could be adjusted to '1 mons 29 days'. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can

Re: [SQL] CREATE TABLE AS and tablespaces

2006-02-24 Thread Bruce Momjian
s: +16 -20 Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT is required by the SQL standard, and TABLESPACE is useful functionality. Patch from Kris Jurka, minor editorialization by Neil Conway. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, I

Re: [SQL] Does PostgreSQL support job?

2006-02-01 Thread Bruce Momjian
tgreSQL? I was thinking about using cron/plsql/sql-scripts > on Linux. The unix cron systems is what most people use. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts R

Re: [SQL] Querying date_time for date only ?

2005-12-22 Thread Bruce Momjian
, and add one day to the second comparison: WHERE col >= date_trunc('day', col2) AND col < date_trunc('day', col2) + '1 day'; -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us |

Re: [SQL] Does VACUUM reorder tables on clustered indices

2005-12-21 Thread Bruce Momjian
cked from writing... Why don't you just do SELECT * FROM tab WHERE col != 'lkjasdflkjadsf'. That should pull things into memory without the VACUUM overhead. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1

Re: [SQL] Date Interval

2005-12-06 Thread Bruce Momjian
?column? --- 2006-03-06 11:53:05.574279-05 (1 row) -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard driv

Re: [SQL] 'AS' in 'DELETE/UPDATE'

2005-11-29 Thread Bruce Momjian
make it not possible to use 'AS' in 'DELETE' and 'UPDATE'? Of course > with described workarounds I can eliminate that problems, but I want > to know is it so in 8.x? Or why, if it right behaviour? > > -- > engineer > > > ---

Re: [SQL] ?Equiv to oracle (ENABLE|DISABLE) (CONSTRAINT|TRIGGER) statements?

2005-10-25 Thread Bruce Momjian
ect this ONLY to work when issued by someone with DBA > privs (and maybe the target object owner, although I imagine reasons > that /might/ be a bad idea for paranoid info management governance). > > Thanks in advance > -- > David T. Bath > [EMAIL PROTECTED] > > &

Re: [SQL] empty view, replace view, column type change?

2005-06-23 Thread Bruce Momjian
es, and similarly > for CURRENT_TIME, CURRENT_TIMESTAMP, and LOCALTIME. Thoughts? Agreed. That "6" bothered me too when I was cleaning up the timestamp code a while back. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us

Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-04 Thread Bruce Momjian
Joe Conway wrote: > Bruce Momjian wrote: > > Joe Conway wrote: > >> > >>Any thoughts on how this should be handled for an empty 1D array? > > > > No one responed to this email, so I will try. Is this the one > > dimmentional array you were talking

Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-04 Thread Bruce Momjian
ng about? test=> select array_dims('{}'::integer[]); array_dims (1 row) Why is [1:0] wrong to return? -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001

Re: [SQL] Query history file

2005-04-02 Thread Bruce Momjian
Mauro Bertoli wrote: > Hi, > I've installed a Postgres 8.0. > There's a history file with all executed queries? If you are using psql, \s will show you your old queries. From the server side, if you enable 'log_statement' all queries will go into the serv

Re: [SQL] PostgreSQL ignores my indexes

2005-02-24 Thread Bruce Momjian
tables. This is the most efficient plan. Of course, > it's an open question whether you want to get 100% of both tables. > But that's what you're doing, and using the index would be more > expoensive than this. Right. The FAQ addresses this issue. -- Bruce Momjian

Re: [SQL] Unresolved external: tgetent

2004-12-12 Thread Bruce Momjian
problem. > > But the 7.4.5 src/Makefile.global still has this: > LIBS = -lz -lreadline -lPW -lgen -lBSD -ldld -lnsl -lm > > So it appears this fix must have been lost anywhere. > > Regards, Christoph > > > > > -----

Re: [SQL] TEXT::CIDR/INET::CIDR output confusion

2004-11-29 Thread Bruce Momjian
-- > PostgreSQL 7.4.5 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC) 3.4.2 > [FreeBSD] 20040728 > > > -- > Fduch M. Pravking > > ---(end of broadcast)--- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce

Re: [SQL] session_id

2004-11-21 Thread Bruce Momjian
t; opportunity. FYI, we needed a unique-through-time session id for the log_line_prefix so we used the seconds-since-1970-dot-pid. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Rob

Re: [SQL] Implicit Transactions

2004-09-20 Thread Bruce Momjian
nd to change that in ecpg or during compile I think. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania

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

2004-09-20 Thread Bruce Momjian
id file, it doesn't attempt to verify that the postmaster > is really alive. Is improving this a TODO item for pg_ctl? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive,

Re: [SQL] aggregate function stddev

2004-09-10 Thread Bruce Momjian
ur desire to choose an index scan if your > joining column's datatypes do not match > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be you

Re: [SQL] Disable trigger with Postgresql 7.4.x?

2004-08-24 Thread Bruce Momjian
> update pg_class set reltriggers=0 where relname = 'YOUR_TABLE_NAME'; > update pg_class set reltriggers = count(*) from pg_trigger where > pg_class.oid=tgrelid and relname='YOUR_TABLE_NAME'; > > What is the recommended way of doing that under Postgres

[SQL] /contrib and win32

2004-08-18 Thread Bruce Momjian
add contrib stuff, and this definately is a problem for many users. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Ne

Re: [SQL] sleep function

2004-08-10 Thread Bruce Momjian
John DeSoi wrote: > Is there a sleep function of some kind? I wanted to simulate a query > taking a long time to execute for testing purposes. I can't think of one, no. I think you will have to use one of the server-side languages and call a sleep in there. -- Br

Re: [SQL] Why no exprs in format string to RAISE

2004-07-06 Thread Bruce Momjian
et AFAIK. It would require some changes to the parser for > plpgsql, but nothing too extreme. Might make a good project for > someone learning more about PG's code. TODO has: o Allow PL/PgSQL's RAISE function to take expressions -- Bruce Momjian

Re: [SQL] array_lower /array_prepend doubt

2004-05-30 Thread Bruce Momjian
ibility reasons. Maybe "whenever any > lower bound is not 1" would do; or maybe we want to invent a GUC switch > to control its behavior. Is this a TODO? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 +

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

2004-04-23 Thread Bruce Momjian
expect gborg projects to individually > adapt it to their needs. Bingo! We have often had the attitude "If we can't do it perfectly, don't do it". While that applies is some cases, it doesn't apply everywhere, and we need to be wise in determining when we are hel

Re: [SQL] lifetime of temp schema versus compiled image of plpgsql proc

2004-04-22 Thread Bruce Momjian
Dennis wrote: > Bruce Momjian writes: > > > > > There is an FAQ item on this --- use EXECUTE. > > So I should be using EXECUTE for all access to the temp tables? ie inserts, > and selects (in this case). Should I use execute for the table creation? All access from

Re: [SQL] lifetime of temp schema versus compiled image of plpgsql proc

2004-04-22 Thread Bruce Momjian
rencing pg_temp_8 in my stored function. > > Can someone explain what is going on? Have I given enough information? > > dennis > pg-user at calico dash consulting dot com > > ---(end of broadcast)--- > TIP 9: the planner will

Re: [SQL] Querying From two databases

2004-04-19 Thread Bruce Momjian
Pallav Kalva wrote: > Hi, > > I am new to postgres and I need to do a query which joins two tables > from different databases. Can you please advice me on how to achieve > this in postgres. Sure, see /contrib/dblink in the source distribution. --

Re: [SQL] Crypt() encryption

2004-04-09 Thread Bruce Momjian
f the Crypt(). Use MD5. That is the best method for this. There is an md5() function already in the database, and there is /contrib/pgcrypto. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard d

Re: [SQL] SQL Standatd

2004-04-07 Thread Bruce Momjian
Joe Conway wrote: > Bruce Momjian wrote: > > Martin Marques wrote: > >>Also, for some reason I can't get to sqlstandards.org. Is there any other > >>place where I can get the SQL200X docs? > > > > Not sure. > > See: > http://www.wiscorp.com

Re: [SQL] SQL Standatd

2004-04-07 Thread Bruce Momjian
.ac.kr/present/SQL3.pdf doesn't exist anymore. Thanks. Removed from FAQ_DEV. > > Also, for some reason I can't get to sqlstandards.org. Is there any other > place where I can get the SQL200X docs? Not sure. -- Bruce Momjian| http://candle.pha.pa.us

Re: [SQL] SQL Standatd

2004-04-07 Thread Bruce Momjian
web site, please see doc/src/FAQ/FAQ_DEV.html in the source tree. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newto

Re: [SQL] SQL Standatd

2004-04-06 Thread Bruce Momjian
I find this "SQL standard"? What is its official site? See the developer's FAQ for URL's. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Chris

Re: [SQL] Can statement_timeout emulated NOWAIT?

2004-03-16 Thread Bruce Momjian
out. Later on, > 7.5, I'd be able to reimplement the low level functions using > NOWAIT without having to change the higher level code. > > Your thoughts and comments are appreciated. > > Thanks > > Luis P Caamano > Atlanta, GA, USA > >

Re: [SQL] Enterprice support in PostgreSQL

2004-02-28 Thread Bruce Momjian
support Load balancing and all other enterprice features. > Can we expect these features in the next version.. We are working on all these fronts. We have replication solutions on gborg.postgresql.org, and some are working on 2-phase commit, perhaps for 7.5, dues in maybe 6 months.

Re: [SQL] User defined types -- Social Security number...

2004-02-28 Thread Bruce Momjian
ed than that. I'm not sure of the > exact rules, but you will never see a leading 0 or a -00- in an SSN. Actually I know someone who's SSN starts as 003. Agreed on the DOMAIN suggestion. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [SQL] array_lower /array_prepend doubt

2004-02-12 Thread Bruce Momjian
Joe Conway wrote: > Bruce Momjian wrote: > > Is this a TODO? > > Probably -- something like: >Modify array literal representation to handle array index lower bound >of other than one Added to TODO. -- Bruce Momjian| http://candle.pha.pa.

Re: [SQL] Is it possible to set a NOT NULL constraint deferrable?

2003-12-06 Thread Bruce Momjian
nt UNIQUE to be deferrable, but you are the first to ask for NOT NULL. Not sure when this will be done. Sorry. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Chr

Re: [SQL] What's wrong with COPY rights in 7.3.4?

2003-12-06 Thread Bruce Momjian
* RIP ** > > > ---(end of broadcast)--- > TIP 8: explain analyze is your friend > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a

Re: [SQL] WITHOUT OIDS by default

2003-11-16 Thread Bruce Momjian
ow wrote: > Hi, > > Is there a way to specify that all tables should be created WITHOUT OIDS by > default? No, and strangely it wasn't on the TODO list. I just added it: * Add GUC setting to make created tables default to WITHOUT OIDS -- Bruce Momjian

Re: [SQL] pg 7.4.rc1, Range query performance

2003-11-10 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Sorry there isn't a simple solution. > > But there is: make an index with the column order (b,c,a). Oh, yea, right. If he puts the columns he is doing a straight equals comparison first, the 'a

Re: [SQL] pg 7.4.rc1, Range query performance

2003-11-10 Thread Bruce Momjian
ow wrote: > --- Bruce Momjian <[EMAIL PROTECTED]> wrote: > > Strange 30 records takes 30x the time than one record. Can you run > > ANALYZE and send us an EXPLAIN of the query to make sure it hasn't > > changed? > > > > explain analyze select * f

Re: [SQL] pg 7.4.rc1, Range query performance

2003-11-10 Thread Bruce Momjian
ld consider implementing "CREATE [CLUSTERED] INDEX" Strange 30 records takes 30x the time than one record. Can you run ANALYZE and send us an EXPLAIN of the query to make sure it hasn't changed? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTE

Re: [SQL] pg 7.4.rc1, Range query performance

2003-11-08 Thread Bruce Momjian
= 5) AND ((c) (..) > Total runtime: 33201.219 ms > > > > > > > > > __ > Do you Yahoo!? > Protect your identity with Yahoo! Mail AddressGuard > http://antispam.yahoo.com/whatsnewfree > > ---(end

Re: [SQL] 7.3 : how add user when last user have lost 'createuser' option

2003-11-08 Thread Bruce Momjian
on ? Uh, you removed createuser permission from the postgres super-user. I think that's why you are getting the failure. I think you have to manually update pg_shadow to fix this, if it will allow that. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [SQL] 7.3 how remove password valid until

2003-11-08 Thread Bruce Momjian
test=> CREATE USER x WITH VALID UNTIL '2005-01-01'; CREATE USER test=> ALTER USER xxxxx WITH VALID UNTIL 'infinity'; ALTER USER -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-

Re: [SQL] Expressional Indexes

2003-10-22 Thread Bruce Momjian
o much like there is computation done during the index lookup, which there isn't, and it sounds like it would behave differently from a normal index, which it doesn't. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359

Re: [SQL] does postgresql execute unions in parallel?

2003-09-29 Thread Bruce Momjian
teknokrat wrote: > If I have several selects joined with unions does postgresql execute the > concurrently or not? No. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 R

Re: [SQL] pg_class.relpages

2003-09-27 Thread Bruce Momjian
Bertrand Petit wrote: > > Does the figures stored in pg_class.relpages include the pages > consumed by the toast tables linked to a normal table? No. See the chapter on monitoring disk space for more information. -- Bruce Momjian| http://candle.

Re: [SQL] [HACKERS] plpgsql doesn't coerce boolean expressions to boolean

2003-09-26 Thread Bruce Momjian
ple could >create casts to boolean to override this behavior in a controlled >fashion.) > > Any opinions about what to do? > > regards, tom lane > > ---(end of broadcast)--- > TIP 2: you can get off all

Re: [SQL] Datafiles for Databases

2003-09-24 Thread Bruce Momjian
t; > select oid, datname from pg_database; > > The path for database 'datname' will be: >$PGDATA/base/oid/ See the "Monitoring Disk Space" section in our manuals. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [HACKERS] [SQL] plpgsql doesn't coerce boolean expressions to boolean

2003-09-09 Thread Bruce Momjian
>> fashion.) > > > I vote for 4. > > I'm willing to do that. OK, what release should we do this? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Robert

Re: [SQL] undefine currval()

2003-09-08 Thread Bruce Momjian
ction" begins, raise anchor when the "connection" ends), and be > independant of the other connections inserting rows to the same table. I don't know how you could have an application that doesn't know if it has issued a nextval() in the current connectio

Re: [SQL] [BUGS] session variable

2003-09-03 Thread Bruce Momjian
gt; > > CREATE TEMP TABLE locals (name text, value text); > > INSERT INTO locals VALUES ('n1','xxx'); > > > > SELECT test_locals_access() ; > > > > column > > ----- > ><=== the Function seing global table >

Re: [SQL] Canceling other backend's query

2003-08-28 Thread Bruce Momjian
daq wrote: > Hi, > > Can i cancel querys runing on other backends, or disconnect a client > from the server? I can kill the backend process, but sometimes this > causing shared memory troubles. See the 'postgres' manual page for a list of signals and their effe

Re: [SQL] postgres 7.1.3: why does the query plan ignore indexes?

2003-08-27 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Should we consider adding some warning when someone creates an index on > > an int2 column? > > I don't think so. Better to expend our energy on solving the > fundamental problem. I am thinking

Re: [SQL] postgres 7.1.3: why does the query plan ignore indexes?

2003-08-26 Thread Bruce Momjian
also consider whether it's really saving you any space to > store product_id as a smallint instead of int. Because of alignment > considerations, it very possibly isn't. > > ---(end of broadcast)--- > TIP 9: the planne

Re: TODO item for plpgsql Was Re: [SQL] obtuse plpgsql function needs

2003-08-01 Thread Bruce Momjian
gt; Aglio Database Solutions > San Francisco > > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.

  1   2   3   4   >