It's also desirable that you use TRIM along with UPPER or LOWER.
Roger.
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
---(end of
I'm using PostgreSQL version 7.3.2, and generate_series() is not
available, so this is a function to generate a series dates.
The function goes backwards if the second argument is less than the first
one. Check the two select statements at the end.
Best Regards,
Roger Tannous.
CREATE FUN
R pg_constraint.conkey[3] =
pg_attribute.attnum OR pg_constraint.conkey[4] = pg_attribute.attnum OR
pg_constraint.conkey[5] = pg_attribute.attnum OR pg_constraint.conkey[6] =
pg_attribute.attnum) OR pg_constraint.conkey[7] = pg_attribute.attnum OR
pg_constraint.conkey[8] = pg_attribute.attnum)
WHERE pg_class.rel
Hi,
Is it possible to issue an SQL query that lists column names, types (int,
varchar, boolean, etc.), properties (like NOT NULL or UNIQUE)
for a given table name ?
Regards,
Roger Tannous.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the
key[9]=pg_attribute.attnum
)
ORDER BY pg_namespace.nspname, pg_class.relname,pg_attribute.attname;
Regards,
Roger Tannous.
--- "D'Arcy J.M. Cain" wrote:
> On Thu, 18 Aug 2005 09:40:57 -0700 (PDT)
> Roger Tannous <[EMAIL PROTECTED]> wrote:
> > Thanks for yo
OUPS !!
Things seem to be stuck now, since the DB version is 7.3.2, so no
array_to_string method is available.
Does anyone have any idea how to solve that ?
Regards,
Roger Tannous.
--- Roger Tannous <[EMAIL PROTECTED]> wrote:
> Hi to all, there was a BIG MISTAKE in my proposition reg
;
I'm sure this should work :)
Now we have the final WHERE statement like this:
WHERE pg_attribute.attnum IN '(\'' || arr
WHERE pg_attribute.attnum IN (1,2)
Finally, this WHERE statement:
WHERE pg_attribute.attnum IN
'(\'' || replace(pg_index.indkey, " ", "','") || '\')'
[
Again, I should test:
WHERE pg_attribute.attnum IN
'(\'
Yes, I want only field names, not values.
Thanks,
Roger Tannous.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---(end of broadcast)---
TIP
Thanks for your query :)
But it only shows the first of the primary keys of tables having multiple
primary keys :)
This is apparently because of the pg_index.indkey[0] thing, so how can we
manage this query in order to get all of the keys :)
Thanks in advance,
Roger Tannous.
--- "D
Hi to all,
Is there any means to get a list of the Primary Keys (or simply the
Primary Key if there's only one :) ) for a given table using an SQL query
?
Regards,
Roger Tannous.
__
Do you Yahoo!?
Yahoo! Mail - You care
lf.relkind
= 'r')
JOIN pg_catalog.pg_namespace nf ON (nf.oid = clf.relnamespace)
JOIN pg_catalog.pg_attribute af ON (af.attrelid = ct.confrelid AND
af.attnum = ct.confkey[1])
WHERE n.nspname = nf.nspname AND n.nspname = 'public' AND clf.relname like
'sip_emp' AND
12 matches
Mail list logo