Re: [SQL] Problems with pg_dump (on Debian i386)

2001-05-25 Thread Tom Lane
ugh of the dump file to reproduce the problem? Also, exactly *what* version hop are we talking about? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] corrupted tables !!!

2001-05-26 Thread Tom Lane
end coredumps), and if so can you provide a debugger backtrace from the core file? regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

Re: [SQL] Problems with pg_dump (on Debian i386)

2001-05-28 Thread Tom Lane
h. I suggest "art" varchar(n)[] NOT NULL, for some appropriate n. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Case Insensitive Queries

2001-05-30 Thread Tom Lane
per() and lower() are not symmetric operations in quite a few non-English locales. I'll let those who regularly work with them give specific details, but handling of accents, German esstet (sp?), etc are the gotchas that I recall. regards, tom lane --

Re: [SQL] ERROR: Class '37632' not found

2001-05-30 Thread Tom Lane
ng the rule entry (delete from pg_rewrite where rulename = 'foo') but I'm hesitant to recommend that when we don't know how you got into this state in the first place. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Case Insensitive Queries

2001-05-30 Thread Tom Lane
dubious micro-efficiency considerations is just plain bad database design. Rather than having blanks that you want to pretend aren't there, you should not have the blanks in the first place. IMHO anyway. regards, tom lane ---(end of broadcast)

Re: [SQL] Case Insensitive Queries

2001-05-30 Thread Tom Lane
ways extremely marginal anyway, if it was real at all when you consider I/O costs --- is gone completely now, because with TOAST in the picture the system cannot assume that bpchar is fixed length on disk. regards, tom lane ---(en

Re: [SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Tom Lane
ty fragile, if not outright broken, approach anyway --- a lock on a view would only protect you against other users of the same view, not against other users accessing the same underlying tables through different views. regards, tom lane ---(en

Re: [SQL] Problem with pg_index.

2001-06-01 Thread Tom Lane
ognize namespaces command. Please upgrade to Tcl/Tk 8.0.x minimum Are you using Tcl? If so, I'd bet the problem is on the client side. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet,

Re: [SQL] PGAccess/pgplsql Blues

2001-06-01 Thread Tom Lane
ss > editing are met with: 'Parse error at or near ""' Hmm, is it possible PGAccess is DOS-ifying the newlines? At one point I fixed plpgsql to accept DOS-style newlines, but maybe someone broke it again. Or maybe that's not the problem, but it's

Re: [SQL] Huh? Data typing bug?

2001-06-04 Thread Tom Lane
e you ought to cast the dates to timestamp or some such. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Problem on CREATE/ALTER USER

2001-06-05 Thread Tom Lane
report than that. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/bug-reporting.html regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] plperl

2001-06-05 Thread Tom Lane
However, Mark Hollomon seems to have lost interest or time to work on it, and no one else has picked up the ball. Any volunteers out there? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe command

Re: [SQL] "Day" from 8am to 3am

2001-06-06 Thread Tom Lane
e selected such that a playday starts at local midnight? regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Getting row with id=max(id)

2001-06-08 Thread Tom Lane
ble ORDER BY id DESC LIMIT 1; > doesn't seem to help very much. It should help a lot, if you have an index on id. Have you vacuum analyzed the table recently? regards, tom lane ---(end of broadcast)--- TIP 3: if posting/re

Re: [SQL] Integrity and Inheritance

2001-06-10 Thread Tom Lane
d on it for 7.1 due to lack of time. However, is that really the major obstacle in the way of inherited foreign keys? Seems like there are a bunch of issues that'd require cross-table unique indexes, as well. regards, tom lane -

Re: [SQL] Memory exhausted

2001-06-11 Thread Tom Lane
locSetAlloc() Try updating to Postgres 7.1. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] finding a maximum or minimum sum

2001-06-11 Thread Tom Lane
make that happen. In 7.1 you can do it directly: select min(amtsum), max(amtsum), avg(amtsum) from (select sum(amount) as amtsum from payments group by userid) ss; In prior versions you'd need to do the initial select into a temp table and then select min/max/avg from that.

Re: [SQL] multiple sql update w/ major time issues

2001-06-12 Thread Tom Lane
gl_totals.FUEL_TYPE = EXTVALUE123; regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] large going giving errors.

2001-06-13 Thread Tom Lane
t;AND uw.id=9 > ERROR: copyObject: don't know how to copy 704 You probably wanted "o.contactname" not "o,contactname". 7.2 will give a more useful error message for this sort of mistake ... regards, tom lane ---(end

Re: [SQL] not null - trivial, unexpected behavior

2001-06-16 Thread Tom Lane
example http://www.ca.postgresql.org/mhonarc/pgsql-sql/2001-06/msg00102.html and followups. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] casts and conversions

2001-06-16 Thread Tom Lane
he standard numeric datatypes in an intuitive fashion without introducing type-specific knowledge. We've had discussions about fixing this in the past (see e.g. pghackers archives from last May & June), but we've not yet come up with a solution that satisfies everyone. It&#

Re: [SQL] not null - trivial, unexpected behavior

2001-06-16 Thread Tom Lane
ll), you'd expect that att = NULL would behave the same as if the NULL came from a CAST, evaluation of a data value, etc. But it doesn't, for reasons that have been discussed already. regards, tom lane ---(end of broadcast)---

[SQL] Re: [ADMIN] need urgent help

2001-06-17 Thread Tom Lane
ion? Table schema? Input data? regards, tom lane ---(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] Re: [ADMIN] need urgent help

2001-06-17 Thread Tom Lane
investigate? regards, tom lane ---(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] Re: [ADMIN] need urgent help

2001-06-17 Thread Tom Lane
than before. What does EXPLAIN say about it? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] casts and conversions

2001-06-17 Thread Tom Lane
ake a choice. The real issue here is that the "preferred type" heuristic doesn't encode enough knowledge to deal with all the numeric datatypes. We need a more general approach. You can find more about this in the pghackers archives, eg thread "type conversion discussion

[SQL] Re: [HACKERS] Postgres

2001-06-16 Thread Tom Lane
you able to connect to do a 'select * from tablename'? I'd like to see exactly what you did and exactly what results you got, not your interpretations about whether there's data in tables or not. Whatever's going on here is probably more subtle tha

Re: [SQL] casts and conversions

2001-06-18 Thread Tom Lane
ur initial typing of such literals as float8 is wrong too. We'll have to fix literal processing as well as the float8-vs-numeric-preference issue before we'll have spec-compliant processing of expressions like "numericvar * 1.234". (And yes, there's been lots and lots of

Re: [SQL] LEFT JOIN ...

2001-06-18 Thread Tom Lane
Try adding ... AND n.nid = 15748 ... to the WHERE. It's not very bright about making that sort of transitive-equality deduction for itself... regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading throug

Re: [SQL] Subselects, the Oracle way

2001-06-18 Thread Tom Lane
That should work fine in 7.1 ... regards, tom lane ---(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] Problems ensuring uniqueness?

2001-06-18 Thread Tom Lane
uness of the > primary key. Um ... surely that should be "if count > 0" ? Or was that just a transcription error? This approach certainly ought to work as desired given the exclusive lock, so a silly typo seems like a plausible explanation...

Re: [SQL] Problems ensuring uniqueness?

2001-06-18 Thread Tom Lane
s like a plausible explanation... > Sorry, it is indeed a transcription error (sadly). Oh well. The next thought, given that you mention threads, is that you've got multiple threads issuing commands to the same backend connection; in which case the interlocking you think you have doesn

Re: [SQL] Sequence behaviour.

2001-06-18 Thread Tom Lane
tval to deliver the specified start value on the first call, rather than the one after that. In 7.1 setval() takes an optional third argument to reset the value of is_called... regards, tom lane ---(end of broadcast)--- TIP

Re: [SQL] Better Archives?

2001-06-18 Thread Tom Lane
lso use Geocrawler's archive at http://www.geocrawler.com/lists/3/Databases/ though this does not cover all the PG lists. I tend to use the mhonarc archives only when I want to browse by date or by thread, not for searches. regards, tom lane

Re: [SQL] LEFT JOIN ...

2001-06-18 Thread Tom Lane
s-lounge/docs/7.1/postgres/explicit-joins.html regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] commentds on redhats new database

2001-06-20 Thread Tom Lane
lk at RedHat's Toronto offices are gearing up to contribute work; I was up there to talk with them just a couple weeks ago. They've not been real visible yet though ... (hey Patrick et al: if you're reading this, it's past time to introduce yourselves).

Re: [SQL] Extracting date from epoche

2001-06-21 Thread Tom Lane
-- epoch (1 row) regression=# select 'epoch'::timestamp + ('1 day'::interval); ?column? 1970-01-01 19:00:00-05 (1 row) Note the epoch is midnight GMT = 7pm local time here. regards, tom lane --

Re: [SQL] case, new column not found

2001-06-21 Thread Tom Lane
m (select *, (CASE ...) AS encontrados FROM admin_view) subsel WHERE subsel.nivel=1 AND subsel.encontrados > 0; at a possible penalty in performance. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] select tbl1.attr1, number of tuples where tbl2.attr1=tbl1.attr1

2001-06-22 Thread Tom Lane
ggregate function How about showing us what you *really* did? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Re: Re: binary data

2001-06-22 Thread Tom Lane
plain text 19 | special chars \012 \001 \002 5 | null 11 | null \000 null (4 rows) regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] Help with a double left join

2001-06-22 Thread Tom Lane
LEFT JOIN project ON track.project=project.pro ject_id regression-# LEFT JOIN client ON track.client=client.ID; project | client | project_id | id -+++ (0 rows) regards, tom lane ---(end of broadcast)--

Re: [SQL] View performance question

2001-06-22 Thread Tom Lane
bably being divided into hash batches, if you use the default sort_mem setting of 512K. Try increasing sort_mem (SET SORT_MEM TO 5000 or so) and see if that makes a difference. regards, tom lane ---(end of broadcast)--- TIP

Re: [SQL] Re: Re: binary data

2001-06-22 Thread Tom Lane
Karel Zak <[EMAIL PROTECTED]> writes: > On Fri, Jun 22, 2001 at 10:22:32AM -0400, Tom Lane wrote: >> He did say the rules for escaping things are tricky ;-). > And what use some better encoding if you have a lot of binary chars > in data. For example base64, that code

Re: [SQL] Incremental sum ?

2001-06-22 Thread Tom Lane
_id and invoice_id <= > i.invoice_id group by cust_id) as balance from invoices_not_paid i; Actually I think you could leave off the inner GROUP BY --- won't there always be exactly one group, since only one value of inner cust_id is selected? regards, tom lan

Re: [SQL] View performance question

2001-06-22 Thread Tom Lane
tables onto them. The syntax you are using is constraining the planner to use what's probably not a good plan. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/explicit-joins.html regards, tom lane ---(end of broadcast)-

Re: [SQL] View performance question

2001-06-22 Thread Tom Lane
d notices in general) come out via stderr not stdout. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [SQL] Correct syntex for implicit curor in for loops

2001-06-21 Thread Tom Lane
n a 7.2 release cycle for late summer and release with whatever's done by then. Anything that's not ready will just have to wait for the next bus. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] Problems using a rule with the WHERE clause

2001-06-25 Thread Tom Lane
rnodocente" AS ON UPDATE TO "docentesturno" WHERE OLD.idpessoal != 0 DO ( ... ); CREATE RULE "updateturnodocente_default" AS ON UPDATE TO "docentesturno" DO INSTEAD NOTHING; Here, the unconditional rule always fires, and the conditional one fires only when its condition

Re: [SQL] Problems using a rule with the WHERE clause

2001-06-26 Thread Tom Lane
ave time to guess at your table declarations...) regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] loosing connection after function call

2001-06-26 Thread Tom Lane
database connection (pgaccess). What Postgres version? regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] Plsql Function with error: No space left on device.

2001-06-27 Thread Tom Lane
w.ca.postgresql.org/mhonarc/pgsql-patches/2001-06/msg00061.html regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Using the extract() function in plpgsql

2001-06-27 Thread Tom Lane
ilt up as strings and EXECUTE'd, rather than just writing them in-line in the plpgsql code. Pretty grotty but it might serve for now. Eventually plpgsql needs to have a way to discard query plans that have been obsoleted by DDL changes. regards, tom lane

Re: [SQL] Plsql Function with error: No space left on device.

2001-06-26 Thread Tom Lane
e FROM clause --- since image is already implicitly part of the FROM list, you are getting a self-join, and an unconstrained one at that. Try just UPDATE image SET seriesoid = r.parentoid FROM relseries_image000 r WHERE image.chilioid = r.childoid; regards, tom lane

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Tom Lane
7;parse > error at or near "("' Are you using 7.1? regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] Problems using a rule with the WHERE clause

2001-06-28 Thread Tom Lane
er consequence of the rewriter bug I fixed on 12-June. Please update to 7.1.2 and apply the patch I posted then. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unre

Re: [SQL] NOTIFY "string" from rule

2001-06-29 Thread Tom Lane
luck. AFAIK the only way to do NOTIFY with a computed name is to write a function in plpgsql or pltcl that computes a string 'NOTIFY whatever' and then EXECUTEs that string. There's no equivalent functionality in SQL-language functions. regards, tom lane

Re: [SQL] indexing arrays in pgaccess's query interface is failing

2001-07-03 Thread Tom Lane
te command punctuation characters that should be passed through. Not sure if that should be regarded as a bug or a feature. It could be considered a feature that you can enter SQL commands with Tcl command substitution performed on them, but it's something that would confuse non-Tcl-us

Re: [SQL] simple function crashes my postmaster

2001-07-03 Thread Tom Lane
use a SERIAL type in the table creation command. I can't duplicate the problem in 7.1.2 (nor current sources). Please update. If you still see the problem with 7.1.2, try setting a breakpoint at elog() to obtain a stack trace from the point of the first error message.

Re: [SQL] count(*)

2001-07-03 Thread Tom Lane
>> You probably mean: >> select car, tit, (select count(*) from auto) from auto I think he probably wants select car, tit, count(*) from auto group by car, tit regards, tom lane ---(end of broadcast)-

Re: [SQL] Kind of error-handler in a pgsql function

2001-07-04 Thread Tom Lane
ero or not-zero rows processed) or the SET DIAGNOSTICS statement to get the row count. There is no way to trap an error inside a plpgsql function, however. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] creating variable views

2001-07-07 Thread Tom Lane
might not be just what you want... regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] creating variable views

2001-07-07 Thread Tom Lane
*either* SQL GRANT-based security or application-based security. The critical factor is going to be whether you represented the "voiding" access privilege separately from the other special privileges of the sysadmin. I don't see how one implementation is going t

Re: [SQL] Problem with function & trigger

2001-07-07 Thread Tom Lane
ot;togliscar" () RETURNS opaque AS 'BEGIN UPDATE magazzino SET quantita = quantita - NEW.quantita WHERE descrizione = NEW.descrizione; RETURN NEW; END; ' LANGUAGE 'plpgsql'; regards, tom lane ---(end of broadcast)--

Re: [SQL] creating variable views

2001-07-07 Thread Tom Lane
t all to the implementation language of a function. The only thing that comes to mind here is that some care has been taken to mark all the built-in functions as "iscachable" (or not, as appropriate); but user-created functions may not be so marked when they should be, leading to

Re: [SQL] CREATE TYPE function examples

2001-07-10 Thread Tom Lane
ions with PG_FUNCTION_INFO_V1(). This is assumed for builtin functions as of 7.1, but the default for dynamically loaded functions is to assume old-style calling conventions. regards, tom lane ---(end of broadcast)--- TIP 5: Have you ch

Re: [SQL] Problem in running the postmaster

2001-07-10 Thread Tom Lane
test version? There is no such debug message in the 7.1 release. I think you are trying to start a 7.0 postmaster in a 7.1 database, or something like that. In any case, you most likely haven't initdb'd with the correct version of initdb. regar

Re: [SQL] ERROR: Procedures cannot take more than 16 arguments

2001-07-10 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> writes: >> FUNC_MAX_ARGS in config.h; see the comments there. > Darn! I asked this a year ago, and was told by somebody at Hub.org that > it couldn't be changed ... A year or so ago, that was the correct answer.

Re: [SQL] cumulative sum in aggregate query.

2001-07-11 Thread Tom Lane
to do it in pure SQL. If you've got lots of data, you should consider just doing "SELECT x,y FROM tab ORDER BY x" and then forming the running sum on the application side. BTW, I didn't come up with that on the spur of the moment --- I got it from Joe Celko's "SQL For Sma

[SQL] Re: [BUGS] ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,9) not found

2001-07-11 Thread Tom Lane
Kristis Makris <[EMAIL PROTECTED]> writes: > but if I want to clear the valuntil completely, how should I issue the > ALTER USER statement? Offhand I don't believe ALTER USER can do that. Feel free to submit a patch ;-).

[SQL] Re: [BUGS] No subselects in constraint (bug?)

2001-07-13 Thread Tom Lane
that what you really want here is a foreign key reference, anyway, not a handmade CHECK constraint. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "

Re: [SQL] Hey! ORDER BY in VIEWS?

2001-07-15 Thread Tom Lane
ERE should not cause the VIEW to return a different row than it otherwise would. regards, tom lane ---(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] Hey! ORDER BY in VIEWS?

2001-07-15 Thread Tom Lane
ows that certain kinds of clauses (like UNION) prevent pushdown. Just an oversight, not a fundamental flaw. regards, tom lane ---(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] Select distinct and order by.

2001-07-17 Thread Tom Lane
ren't well-defined. You can probably accomplish what you want in a slightly better-defined way with SELECT DISTINCT ON. See the SELECT reference page. > Also in certains situations (in versions 7.0.x) this query fails from > libpq: "Fails" how? regar

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Tom Lane
ion sees. If you are absolutely intent on doing this, you could use a function coded in C or in pltclu (unsecured pltcl). But there's no feature in plpgsql to do it, and requests for one are not likely to meet with much favor. regards, tom lane

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Tom Lane
ata import issue, why do you want to do it in a plpgsql function? Do the format massaging on the client side. I'd think about making a simple little sed or perl script (or whatever text-masher you like) producing data that COPY would take. regards, tom lane --

Re: [SQL] pl/pgsql - code review + question

2001-07-18 Thread Tom Lane
e in the 7.1 plpgsql documentation: RAISE doesn't actually accept an expression for its string parameter, only a literal (and only simple variables for the additional parameters). So you need to write something like raise exception ''Member % not found'', unitn

Re: [SQL] pl/pgsql - code review + question

2001-07-18 Thread Tom Lane
hange, but I've no time to look at it myself; any volunteers out there? regards, tom lane ---(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] multiple lookup per row

2001-07-20 Thread Tom Lane
t an execution error, which is definitely not what you want... but you could patch it by including LIMIT 1 in the sub-SELECTs, and perhaps also an ORDER BY to determine *which* phone number is the single one shown. BTW, I second Josh' recommendation of "SQL for Smarties".

Re: [SQL] Cast '' (blank) to null date

2001-07-20 Thread Tom Lane
e application side, or perhaps in the SQL query with a CASE expression. regards, tom lane ---(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] Query optimizing - paradox behave

2001-07-20 Thread Tom Lane
tient.name using <" > > 2tableni > 1.730u 0.120s 0:09.44 19.5% 0+0k 0+0io 208pf+0w 9.44 vs 11.14 seconds looks like a clear advantage for the second query to me... regards, tom lane ---(end of broadcast)---

Re: [SQL] Get the tables names?

2001-07-20 Thread Tom Lane
o that the convention can be relied on. So the correct way to exclude system tables is SELECT * FROM pg_class WHERE relkind = 'r' and relname not like 'pg_%'; If you try "\d" in psql after starting it with -E option, you will discover that

Re: [SQL] Re: When PostgreSQL compliant JDBC 2.0?

2001-07-24 Thread Tom Lane
"Ed Yu" <[EMAIL PROTECTED]> writes: > ... I've been trying to get in touch with > whoever works on the postgresql jdbc driver with no luck. You're looking in the wrong mailing list. They hang out in pgsql-jdbc. regards, tom lane --

Re: [SQL] Determining if two subnets intersect

2001-07-24 Thread Tom Lane
, but ISTM it's only possible for two CIDR subnets to overlap if one contains the other. So you could check with A <<= B OR B <<= A regards, tom lane ---(end of broadcast)--- TIP 3: if posting/r

Re: [SQL] Re: Inserts in triggers Follow Up

2001-07-25 Thread Tom Lane
he query that he showed us. An unexpected substitution in the WHERE clause seems like a plausible theory. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Meta integrity

2001-07-26 Thread Tom Lane
n do a direct two-column foreign key constraint, plus add a check constraint like CHECK(class_id = 'X'). regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] nullif BUG???

2001-07-28 Thread Tom Lane
ll yield NULL, which is interpreted as a FALSE case test, so you get the ELSE case, ie value1, ie NULL. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nom

Re: [SQL] Re: Restriction by grouping problem.

2001-07-29 Thread Tom Lane
, and that row will be the one with least datetime. See the DISTINCT ON example in the SELECT reference page. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Date Time Functions - ANSI SQL ?

2001-07-29 Thread Tom Lane
regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Big table - using wrong index - why?

2001-07-30 Thread Tom Lane
4 columns, BTW. This is on the to-fix list... see the pghackers list archives for excruciatingly long discussions about how to fix it without breaking other cases... regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] union in subselect?

2001-07-31 Thread Tom Lane
r "union" Update to PG 7.1. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] Fuzzy matching?

2001-07-31 Thread Tom Lane
ould be nice but will have to wait for > someone's $100,000 project; Uh, have you looked at contrib/soundex? The Soundex code is kinda specialized but might be just what you want... regards, tom lane ---(end of broadcast)---

Re: [SQL] Fuzzy matching?

2001-07-31 Thread Tom Lane
ckend? I'd certainly accept such functions as /contrib material, but probably would want to wait to see if they get used much before putting them in the standard backend ... regards, tom lane ---(end of broadcast)--- TIP

Re: [SQL] Fuzzy matching?

2001-07-31 Thread Tom Lane
t in contrib for awhile and see if anyone uses it. If there's sufficient interest, we'll promote it to mainstream in a future release. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] Converting epoch to timestamp?

2001-08-01 Thread Tom Lane
timestamp; ?column? 2001-08-01 09:52:34-04 (1 row) which can be written more presentably as regression=# select timestamp(996673954); timestamp 2001-08-01 09:52:34-04 (1 row) (This last didn't use to work,

Re: [SQL] Exclusion List

2001-08-01 Thread Tom Lane
lettertype=1) AND > aclgroup IN (1,2); Try an EXCEPT, along the lines of (select id from users where conditions) except (select userid from sentletters where other-conditions); regards, tom lane ---(end of broadcast)---

Re: [SQL] Outer Join Syntax

2001-08-01 Thread Tom Lane
join order by parenthesization, which is not so important for your star-query example, but is critical if you want to join two outer-join results together --- otherwise, you can't control which combinations result in partially-NULL rows out, and which result in no rows out.

Re: [SQL] converting timestamps to ints

2001-08-02 Thread Tom Lane
t --- more docs always welcome ;-) regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Data type confusion

2001-08-05 Thread Tom Lane
e plenty of such gaps in our operator set... > Shouldn't > INTERVAL / INTERVAL = INTEGER? I'd think the output should be FLOAT8, myself, since the result could be fractional. Anyway, the generic response to such questions is "feel free to code it up and submit a p

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Tom Lane
lus 4.5 days, and then we translate the .5 months into 15 days. This is pretty grotty, and AFAIK not documented anywhere --- I found it out by looking at the C code for these operators. But I'm not sure how to do better. regards, tom lane

<    1   2   3   4   5   6   7   8   9   10   >