Hi-
I can't figure out how to do this
I examine a table where I think that one attribute is an abbreviation of
another attribute.
So-If I had a table where I had LONG_NAME and ABBR as attributes.
I want something like
SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
--+---
> fs | fsolomon
> bg | bgatewood
>
> Note that ~ does a case-sensitive regex match. If you really want a
> 'like' match, you could do this instead:
>
> SELECT * FROM abbrev where long_name~~('%' || abbr || '%');
>
> ... where &
Chris/ Josh-
OK-response to Chris below. Synopsis heresimply by creating a foreign
key will not create an index. On large tables I SHOULD put a non-unique
index on the foreign key (right?)
Hmm...nope. Creating a foreign key doesn't create an index. However,
creating a primary key does
Hi all-
I am wondering if I can get some input on the logic that I would need to
code a function that would mimic mysql's last_insert_id()..
Here is what last_insert_id() does in mysql:
Returns the last automatically generated value that was inserted into an
AUTO_INCREMENT column.
mysql> SELECT
; From: Josh Berkus [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 11, 2002 10:31 AM
> To: Beth Gatewood; [EMAIL PROTECTED]
> Subject: Re: [SQL] writing a function to mimic mysql last_insert_id
>
>
>
> Beth,
>
> > I am wondering if I can get some input on the l
was to trying to avoid having the developers make a
lot of sql revisions to their application.
Thanks-Beth
> -Original Message-
> From: Christopher Kings-Lynne [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 11, 2002 7:05 PM
> To: Beth Gatewood; [EMAIL PROTECTED]
> Su
Thanks for the excellent description, Josh. And the reminder of the
performance list (it's existence somehow slipped from my mind).
-Beth
> -Original Message-
> From: Josh Berkus [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 10:56 AM
> To: Beth Gatewoo
Hi-
This is more just trying to understand what is going on under the hood of
pgsql. I have read through the archives that there is no difference between
index on char, varchar or text. I am wondering why? I understand all the
arguments about saving space but I am specifically asking about ind
SorryI don't understand. The length is at the front of what?
-Beth
> -Original Message-
> From: Bruce Momjian [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 10:06 AM
> To: Beth Gatewood
> Cc: [EMAIL PROTECTED]
> Subject: Re: [SQL] inde