queue_id
FROM queue
WHERE id = p_queue_id
ORDER BY rank
LIMIT p_number_of_items);
--
D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
?
What's next? Only help white folks?
--
D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
--
Sent via pgsql-sql mailing list (pgsql-sql
On Sun, 08 Feb 2009 10:39:26 -0500
Tom Lane t...@sss.pgh.pa.us wrote:
D'Arcy J.M. Cain da...@druid.net writes:
What's next? Only help white folks?
This guy doesn't really deserve being responded to. Just ignore him.
Yes, as I was hitting the send key I wondered if he was just a troll
need MD5 or Blowfish it wouldn't be very hard to
modify the code.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
--
Sent via pgsql-sql
the
rule that you are trying to enforce with the new constraint.
Also, I am pretty sure that you do not want the constraint
FK1_SecurityRolePermission that you created on SecurityRole. What do
you think that will accomplish?
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three
On Tue, 18 Mar 2008 13:57:39 -0700
Steve Midgley [EMAIL PROTECTED] wrote:
At 12:36 PM 3/18/2008, D'Arcy J.M. Cain wrote:
On Tue, 18 Mar 2008 12:23:35 -0700
Steve Midgley [EMAIL PROTECTED] wrote:
1) Create a second field (as someone recommend on this list) that
is an
MD5 of your primary
and I hope the OP finds
your input and mine useful in coming up with a final answer to his
issue. Thanks for taking the time to consider the issue and I'll look
forward to any additional ideas or comments you have on this too!
Yes, discussion is always useful, and fun. :-)
--
D'Arcy J.M
, what is the purpose of this? I suspect that this is
either a homework problem or you may be attacking some real-world
problem from the wrong angle.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416
the error message should be that
someone in the system already has the password that you tried to use?
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's
on a calculation then you
can't change that one person's security code.
Generate a random number and store that. You will be much happier when
something goes wrong and something always goes wrong.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy
and Siegel!
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 2
and second but if you mean that
you want a list of all clinics that match the clinic ID and you want to
know of all of those which ones have the specified date then perhaps
this is what you want.
SELECT id, date = '%s' FROM schedule WHERE clinic_id = '%s';
--
D'Arcy J.M. Cain [EMAIL PROTECTED
different
generator systems.
Hope this gets you started. There's still lots of gotchas on the way.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's
. :-)
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 7: You can help
to program defensively.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast
-key
field(s).
- The primary key must be compact and contain the fewest possible attributes.
- The primary-key value can?t be changed.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212
be the primary key and have NULLs. It sounds to me like you
have a design problem somewhere.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
not be a single query:
- Select into temp table where date is max.
- Select from temp table union with main table where date is max and
is not in temp table.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep
?
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 3: Have you
need to check for irrelevant changes in the dump before calling
svn.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
that is changed ad hoc with
no design work beforehand. If you work from the design side first you
can create schema documents that feed your database creation and use
svn to save those versions and document exactly why things changed.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 4: Have you
J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 1: if posting/reading
to the head office.
There are many possibilities. Which one is best will depend on
analysing your particular business model.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082
On Tue, 9 Jan 2007 09:13:35 -0600
Aaron Bono [EMAIL PROTECTED] wrote:
On 1/9/07, D'Arcy J.M. Cain darcy@druid.net wrote:
company === address === detail
This approach implies that the address defines the relationship between a
company and the detail (the other departments/offices). I
or slot-tts_tupleDescriptor. If the
first shows a non NULL value and the second causes your crash that
tells you that the value of slot is probably trashed before
calling the function.
Do this in conjunction with Tom Lanes suggestion of --enable-debug for
more information.
--
D'Arcy J.M. Cain darcy
coming out of this with something
interesting, even if it isn't what you went in looking for.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
immediately raises the hairs on the back of my neck. If the primary
key can ever change, you have a broken schema.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
? Otherwise, I can't see anything
wrong from a relational database POV.
What are people saying is wrong about it?
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
requirements. That may be more complicated,
simpler or both than we know now.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
.
if year 50:
year += 2000
elif year 100:
year += 1900
That will probably handle most cases for you. Alternatively, don't
allow dates outside of your known domain.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy
date?
It is invalid. There was no year 0. Perhaps what you want is NULL or,
possibly, EPOCH if you are looking for a sentinel value.
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD
AND
pg_index.indisprimary='t' AND
pg_index.indkey[0]=pg_attribute.attnum
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
[7]=pg_attribute.attnum OR
pg_index.indkey[8]=pg_attribute.attnum OR
pg_index.indkey[9]=pg_attribute.attnum
)
ORDER BY pg_namespace.nspname, pg_class.relname,pg_attribute.attname;
--
D'Arcy J.M. Cain darcy@druid.net | Democracy is three wolves
http://www.druid.net/darcy
| rotten
SELECT fstate.fstate_name AS Fruit state
FROM table, fstate
WHERE table.fstate_id = fstate.fstate_id;
Now you can easily add another state:
INSERT INTO fstate VALUES (4, 'smelly');
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy
and usage but this may be a better solution for
you.
As usual, if not completely satisfied you get a full refund.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
is a sample (Unix) command line that I
commonly use to run statements from a file:
psql table -f in.file -e out.file 21
Now I can search the file for ERROR and see exactly what preceded it.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy
with IS NULL and IS NOT NULL.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast
a few things to contribute but it
would help to see what's already there.
--
D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner
.
And make sure that you check your local rules. Mortgages are actually
calculated differently in Canada and the US.
--
D'Arcy J.M. Cain [EMAIL PROTECTED]|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
On Tuesday 28 October 2003 08:28, Franco Bruno Borghesi wrote:
Dopping the whole database just for a column change?
I guess some people have really small databases that don't take 3 days to dump
and reload. :-)
--
D'Arcy J.M. Cain [EMAIL PROTECTED]|vex}.net | Democracy is three wolves
that changes
your primary key without an explicit command to do so. In fact, sometimes I
think that the database should enforce the rule that primary keys are
immutable and not even allow it explicitely. Perhaps a configuration option.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy
the number of decimal places
on output but I am not sure if that would affect the primary benefit of using
it, speed.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
they released it with an ABORT, the number simply became available again
to the next process. I'm not sure how to do something like that without the
ability to exclude locked records from the query or else with an atomic
compare and set function.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy
= 'account2' ORDER BY dsply_order;
This should give you exactly the same result:
SELECT * FROM files WHERE accountid = 'account2' ORDER BY fileid.
It all depends on what problem exactly you are trying to solve of course.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http
couldn't find anything in the docs or web specifically about this. Does
anyone have any ideas?
Adding hackers as this may be an internal issue.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425
lock the entire certificate table?
Is there something strange because of the IN clause or because it is going
into a temporary table? This is a production server running 7.2.2 so perhaps
it is fixed in 7.3.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http
. It's on the TODO list.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast
but perhaps you need another table
instead of/in addition to this one that just tracks the counts. You
can use a trigger to increment it. If you only allow inserts this
should be easy. Deletes are easy too. Updates are a little trickier.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three
.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast)---
TIP 5: Have you
is to avoid getting the PostgreSQL internal tables
in the output.
Further, to only get tables and not views, indexes, sequences, etc you
can do this.
SELECT tablename FROM pg_tables
WHERE relkind = 'r' AND tablename NOT LIKE '%pg_%';
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy
/pgsql/contrib/chkpass/.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner.
---(end of broadcast
x WHERE i = 2;
?column?
--
f
(1 row)
darcy=# SELECT i, raw(p) FROM x;
i | raw
---+---
1 | SoLA2YFpQYV/I
2 | Sg8CKkFqqTGec
(2 rows)
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy
er will be increased to 11. If your transaction is rolled back
then you may have a hole if someone else used a number but it will be filled
the next time that someone requests a number from that sequence. They aren't
strictly speaking consecutive but they are complete.
--
D'Arcy J.M. Cain d
CREATE FUNCTION bool2int(bool) RETURNS integer
AS 'select (case when $1=true then 1 else 0 end)'
LANGUAGE 'sql';
You can do: sum(bool2int(ab))
easy ??? ;-))
Almost as easy as "SELECT COUNT(*) FROM table WHERE a b"
--
D'Arcy J.M. Cain darcy@{druid|vex}.net |
the primary key
and use it.
Is there syntax to create a primary key after the
table has been defined and populated? I think I could
speed things up quite a bit by not having any indexes
at all when I do my mass copies.
Why not just use the copy function? That's what it's for.
--
D'Arcy J.M. Cain
PostgreSQL? I
do this in a view and it works.
SELECT CASE WHEN login IS NULL THEN uid::text ELSE login END AS login
FROM account;
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212
# one column and split out parts
with various functions. Don't forget to have a place for country code
and extension.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net | Democracy is three wolves
http://www.druid.net/darcy/| and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP
operator
stuff from the docs (I needed scalar??sel instead of int??sel) and
now everything I had before plus the chkpass stuff works. I'll
send the corrected chkpass stuff for contrib and work on that phone
number item I mentioned in another message.
--
D'Arcy J.M. Cain darcy@{druid|vex}.net |
59 matches
Mail list logo