[GENERAL] Default UUID in Postgres

2008-07-09 Thread Swaminathan Saikumar
Hello,

I created a Postgres table with a UUID. I want the UUID to be populated by
default.

Sample table:
CREATE TABLE t
(
  token uuid NOT NULL,
  CONSTRAINT unique_token UNIQUE (token)
);

I tried out this post:
http://archives.postgresql.org/pgsql-general/2006-08/msg01452.php
CREATE TABLE t (id UUID DEFAULT 'uuid(4)' PRIMARY KEY);

and got an error that uuid(4) is undefined.

I then tried out:
http://www.postgresql.org/docs/8.3/static/uuid-ossp.html
using uuid_generate_v4() for the default.

That didn't work as well.

Can anyone help please?

Thanks!


Re: [GENERAL] Using tables in other PostGreSQL database

2008-03-27 Thread Swaminathan Saikumar
I am fairly new to Postgres. However, I have to say that I agree with
Barry's comments.
The community's response is technically valid; they do talk about a better
way of 'designing' things, and what the company 'should' be doing.
However, coming from a MS-Sql world, people want multiple databases for
different reasons. Sometimes, they are in different departments, and they
keep their own databases, as in Barry's example. Sometimes, a billing
database is behind a firewall for security.
There are multiple ways to do the consolidation, by copying over data to a
common database with multiple schemas. However, the core question of Barry's
has not been answered.

1. There is a feature for cross-linking databases
2. That feature is available as an add-on
3. That feature is very useful for a lot of users, who are not as
knowledgeable as the PgSql community, and who are used to doing that for
other databases
4. Why not provide that feature as a core feature, rather than an add-on? If
the community really feels strongly about this, discourage this practice
with a best-practices section, citing problems with examples, and
workarounds. But why don't you provide this feature out of the box? After
all, isn't widespread adoption of a high quality database like Postgres our
overall goal?

On Thu, Mar 27, 2008 at 6:08 PM, Jorge Godoy [EMAIL PROTECTED] wrote:

 Em Thursday 27 March 2008 08:29:04 Pettis, Barry escreveu:
  An addon  Being self schooled in databases to me this seems to be a
  kludge.  If you work in a large company environment the odds that
  someone somewhere is all ready storing or collecting data that you need
  ( by this I mean base data ) could probably be pretty high.  So why, if
  PostGre is so old/established, is the ability to share information
  between databases have to be done through an add on.
 
  So let me give an example to help clarify.
  1.  I work in a manufacturing environment
  2.  Our product can have 150 to 450 different / unique process steps
  3.  We have a description of each process step
  4.  So with a product we can look at it's flow and see the descriptions
  of each step
 
  Now say person A pulls this information on a daily basis and then
  summarizes the product manufacturing information and creates a table
  that has say the total number of process modules ( aka group of steps ),
  the total number of steps, the total number of a particular type of
  step.
 
  Now let's say that another person NEEDS that very information in a query
  or table in their own database.  Are you saying that each person needs
  to generate this.  To me the sharing of information seems to be so basic
  that within a said postgre server, that as along as you have access to a
  said database you should be able to say use the data stored here.  And
  that that ability should be a rudimentary ability not an addon.
 
  Reason why I don't' have ability to install addon's onto the database.

 It sounds to me like your company could make a good use of a DBA to
 organize
 all that.

 Users should just use the data, not plan the database and keep multiple
 copies
 of information around.

 One person designing all this would be able to organize the information,
 keep
 its integrity, safety / secrecy and while doing all that also provide the
 people using the information a better way to get it.

 If everyone is creating their own database, then getting access to the
 information isn't the biggest problem.  Guaranteeing that all reports are
 generated from the same information -- imagine sales reporting something
 from
 last month while marketing is doing the same for this month and
 manufacture
 is insterested on the history for the same month but comparing it to the
 last
 three years history?  A big mess...


 --
 Jorge Godoy  [EMAIL PROTECTED]


 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general



[GENERAL] NauckIT PostgreSQL provider working with Mono?

2008-03-25 Thread Swaminathan Saikumar
Hello, I was about to start on Forms Authentication with Postgres in .NET on
Mono.
I found this message from Kevin:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg23395.html
but didn't find any responses.

I was wondering whether anyone got this working, and has any documentation
that can help.

Thanks


[GENERAL] Cross database joins feature request

2008-03-03 Thread Swaminathan Saikumar
Thanks for telling me that Postgres doesn't support cross-database joins.
I know MS Sql Server does. And one of the companies I worked for used it, to
sometimes have a secure database with sensitive info behind a firewall join
queries with a less secure database.

Is this something worth considering adding as a feature to Postgres?


[GENERAL] Design suggestion of multiple databases vs multiple schemas within the database

2008-03-02 Thread Swaminathan Saikumar
I am building a web app with Postgres, that also uses Drupal with Postgres.
I am new to all these frameworks.

There is some data that I'll need to cross-reference between the two
databases.

Can I do a cross-schema/catalog join? Or is a cross-database join better?
Are there any gotchas for the cross-schema/cross-database joins that I need
to be aware of? Such as when using Shared hosting?

Any suggestions/comments appreciated.

Thanks


[GENERAL] Unicode comment on Postgres vs Sql Server

2008-03-02 Thread Swaminathan Saikumar
I am familiar with MS Sql Server  just started using Postgres.
For storing Unicode, Sql Server uses nvarchar/char for unicode, and uses
char/varchar for ASCII.
Postgres has this encoding setting at the database level.

I am using UTF8 Unicode for most of my data, but there is some data that I
know for sure will be ASCII. However, this is also stored as UTF8, using up
more space.

At first sight, it looks like the the more granular level design is better.
Any comments? If you agree, does it make sense to add this as a new datatype
to Postgres?

Thanks


Re: [GENERAL] Unicode comment on Postgres vs Sql Server

2008-03-02 Thread Swaminathan Saikumar
I didn't have proper knowledge about the UTF8 format, thanks.
I originally meant nvarchar  nchar, which is basically varchar  char that
supports Unicode regardless of the database encoding.

On 3/2/08, Tino Wildenhain [EMAIL PROTECTED] wrote:

 Swaminathan Saikumar wrote:
  I am familiar with MS Sql Server  just started using Postgres.
  For storing Unicode, Sql Server uses nvarchar/char for unicode, and uses
  char/varchar for ASCII.
  Postgres has this encoding setting at the database level.
 
  I am using UTF8 Unicode for most of my data, but there is some data that
  I know for sure will be ASCII. However, this is also stored as UTF8,
  using up more space.


 This is wrong - ASCII is a subset of UTF8 and therefore uses
 exactly one byte for every ASCII char.

 See http://en.wikipedia.org/wiki/UTF-8 for example.


 
  At first sight, it looks like the the more granular level design is
  better. Any comments? If you agree, does it make sense to add this as a
  new datatype to Postgres?


 Which new datatype?

 Regards

 Tino




[GENERAL] Is PostGreSql's Data storage mechanism inferior?

2008-01-30 Thread Swaminathan Saikumar
Hi all,

I'm new to PostGreSql.

http://searchyourwebhost.com/web-hosting/articles/insight-database-hosting-using-sql

Check out the link. I am starting out on a new personal project  had zeroed
in on PostGreSql with Mono-ASP.NET as ideal for my needs, mainly owing to a
PostGreSql whitepaper.
Now, I chanced upon the article above. I've pasted the cons as mentioned in
the article, and would like the community feedback on it, especially with
regards to the inferior Data Storage mechanism.

The cons of PostgreSql Hosting
* Performance considerations: Inserts and Updates into the PostgreSql
database is much slower compared to MySql. PostgreSql hosting thus might
slow down the display of the web page online.
* BSD license issues: Since PostgreSql comes under the Berkeley license
scheme, this is again considered to be too open.
* Availability of inferior Data Storage mechanism: PostgreSql uses Postgres
storage system, which is not considered to be transaction sae during
PostgreSql hosting.
* Its not far-flung: While MySql hosting and MSSql hosting have deeply
penetrated into the market, PostgreSql hosting still remains to be passive
in the database hosting market.
* Non-availability of required assistance for PostgreSql hosting: Assistance
is being provided via mailing lists. However there is no guarantee that the
issue faced during PostgreSql hosting would be resolved.

Thanks!


Re: [GENERAL] Is PostGreSql's Data storage mechanism inferior?

2008-01-30 Thread Swaminathan Saikumar
Thanks everyone. After all the good things I heard about
Postgres, I was surprised to see this article; and the point on
storage concerned me.
I am glad to see that the article was wrong, not only on the storage engine
count, but also on others.
Thanks for the feedback.

On 1/30/08, Erik Jones [EMAIL PROTECTED] wrote:


 On Jan 30, 2008, at 6:22 PM, Richard Broersma Jr wrote:

  If you don't get too much feed back on this subject, just remember
  that topics like this come up frequently to the point of list
  member exhaustion.   You can find such discussions if you search
  the list archive.

 Too true.  There's only so many times people can be confronted with
 Defend yourselves! before they start ignoring it.  On the flip
 side, when you approach with Tell me, what advantages does Postgres
 have to offer? you'll find many people all too willing to step up
 with pride.

 Erik Jones

 DBA | Emma(R)
 [EMAIL PROTECTED]
 800.595.4401 or 615.292.5888
 615.292.0777 (fax)

 Emma helps organizations everywhere communicate  market in style.
 Visit us online at http://www.myemma.com