Assuming you know the schema name, you could always check the catalog table,
something like
select count(*) from pg_tables where schemaname= 'foo' and tablename='bar'
If it returns, then you know a table by the name foo.bar exists. if not you can
create it.
-Said
Jennifer Trey wrote:
No
Primary keys are defined as 'unique not null' even if they are
composite. So I believe postgres would not let you do that:
5.3.4. Primary Keys
Technically, a primary key constraint is simply a combination of a
unique constraint and a not-null constraint.
A primary key indicates that a c
Miguel,
Tenras mas exito si haces tus preguntas en la lista en espanol : pgsql-es-ay...@postgresql.org ya
que ahi la majoria de la gente habla ingles y no espanol
-Said
Said Ramirez
Miguel Angel Hernandez Moreno wrote:
disculpen alguien tiene
o sabe de algun documento que me pueda
les where
schemaname = 'bar' ;
Note that it is important to select the schemaname because there could be two different tables in
two different schemas with the same tablename. Also you should keep in mind that this will only work
for tables, if you start adding views you have to add mo
Have you tried sql relay? They support may platforms:
http://sqlrelay.sourceforge.net/
-Said
Martin Spinassi wrote:
Hi list!
I'm searching for something to use as a proxy for different instances of
postgres.
I've found pl/proxy, but it seems to work with (correct me if i'm wrong)
functio
Is there a limit to the number of entries I can pass in an IN clause as
part of a SELECT statement? As in
SELECT baz FROM foo where id in ( 1, 2,... ) ;
Thanks,
-Said
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgre
I think you are more after something like
SELECT CASE WHEN foo IS NULL THEN 'NA' END FROM bar.
-Said
Ivan Sergio Borgonovo wrote:
On Thu, 6 Nov 2008 17:44:42 -0800 (PST)
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> I can specify the text used to represent a null value in output
> from copy, but
According to the documentation, http://www.postgresql.org/docs/current/interactive/sql-truncate.html
, only the owner can truncate a table. Which means the non-owner must either log in/ switch roles as
the owner, or they can just run a DELETE.
-Said
smiley2211 wrote:
Hello all,
I am trying
table);
?
Is it possible to add a unique constraint to the table, with a
"delete" option so it will delete duplicates?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sa
There is probably a more elegant way of doing it, but a simple way of
doing it ( depending on the size of the table ) could be:
begin;
insert into foo select distinct * from orig_table;
delete from orig_table;
insert into orig_table select * from foo;
commit;
-Said
A B wrote:
I have a ta
You can probably use [^0-9]
-Said
Garry Saddington wrote:
I have the following simple regular expression:
"SELECT substring(addressline1 from '(^[0-9]+)') from addresses"
How could I find non-matches of this same pattern?
regards
Garry
--
Sent via pgsql-general mailing list (pgsql-general@po
11 matches
Mail list logo