Re: sequence in schema -- broken default

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Lee Harr <missive(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: sequence in schema -- broken default
Date: 2004-01-23 18:51:54
Message-ID: 40116D4A.40608@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>
>
>
> By the way... should the way you wrote it work?
>
No. I did not complete the syntax.

> # INSERT INTO one.foo VALUES ();
> ERROR: syntax error at or near ")" at character 29
>
> Seems like maybe it should work with the default, but I don't know.
>
No, the reason the below works is version() is a function where values
() is not.
I don't think you are going to have any choice but to hardcode the
sequence value
unless you want to bounce in between search paths based on who is
connecting.

>
> # select version();
> version
> ---------------------------------------------------------------------
> PostgreSQL 7.4.1 on i386-portbld-freebsd4.9, compiled by GCC 2.95.4
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ezra Epstein 2004-01-23 18:59:02 Re: If table A value IS NULL then table B
Previous Message Reece Hart 2004-01-23 18:48:27 Re: psql: relocation error: psql: undefined